views:

23

answers:

1

When i run my project with the "Run main project" mode, my program writes the .txt file to my /home directory. I found this extremely odd, so I ran the program with "Debug main project" mode and it wrote the .txt file to the project directory. Is there a setting in options that will fix this so both modes will write the file to the project directory?

I have tried to make new projects with the same results

A: 

Most C++ projects in Netbeans have a Debug and Release configuration. Both of these may have different settings for running the program and should be checked to see if one of them specifies a "run directory".

If you right click on the root of the project tree and select properties, you will notice a drop-down at the top for "Configuration" that will allow you two switch between the two groups of settings. alt text

Arnold Spence
I set both configurations to the same run directory and no dice.... it still writes the file to my /home directory.
TheFuzz
Just out of curiosity, what exactly is set for the run directory?
Arnold Spence
Perhaps check the output paths in the Linker category, maybe one is less deeply nested than the other? I'm grasping here :)
Arnold Spence
One more thing to try, use your favorite diff program to compare Makefile-Debug.mk and Makefile-Release.mk and see if anything jumps out at you.
Arnold Spence
@Arnold /home/omgbears/NetBeansProjects/Tetris
TheFuzz
I'll keep thinking about it then. Good luck.
Arnold Spence
did you have any more ideas? I really like the netbeans IDE
TheFuzz
It's the IDE I use at work and at home. Perhaps you could add some code to the question area that shows how you are setting up the file for output.
Arnold Spence