I had an old folder of C++ exercises, containing a Makefile and some source files. Each source file would compile to one executable. I imported that folder into NetBeans then wondered how to run and debug each executable as a different 'Main Project'. After some twiddling, the solution (hack?) is to define different configurations for the project, one for each executable.
- Select your project's context menu item Set Configuration / Manage Configurations….
- In the Project Properties dialog, press the Manage Configurations button (I know that's rather confusing).
- In the Configurations dialog, create a new configuration with the target executable file name.
- Press the OK button to close the Configurations dialog.
- In the Project Properties dialog, select the Categories / Build / Make node.
- Select your configuration from the Configuration: drop down list. Note that you have to select any node other than General otherwise the Configuration: drop down list is disabled.
- In the Makefile panel:
- Working Directory = . (current directory)
- Build Command = ${MAKE} -f Makefile <file.exe>
- Clean Command = ${MAKE} -f Makefile clean
- Build Result = <file.exe>
- Press the OK button
Now, to run or debug a different executable, I just change the project's Active Configuration.
Performance comments
ReplyDelete1.I used only Dev versions for my work
2.I am satisfied as per my current system's configuration.
3.It still slows down after a few hours of use, particularly if you are doing lots of project configuration changes.
4.The default task list generation is a bad idea. By setting it to current file only, I make it work for me. WHY ?
5.It seems that both release basically the same in context of performance. But because when I am using RC1, I also using the new JDK 6u10, it feel (not scientific, just feeling only) faster, but I suspect it is more on the Java 6u10 upgrade rather than Netbeans itself.