-
Notifications
You must be signed in to change notification settings - Fork 14
Configuring Netbeans IDE
This is a detailed version of how to use Focus with Netbeans. IDE's like Netbeans provide cool features to develop code and also debug. Netbeans is really good with C++ projects. Focus relies on CMAKE to generate makefiles and the GUI is based upon Qt5. This make it complicated to set it up normally on IDE. Here, all the required steps are detailed:
Note this tutorial was done with Netbeans version, Qt version 5.8 and cmake version 3.2.3
Also before proceeding further make sure that you have following required dependencies:
- cmake
- git
- g++/gfortran/gcc
- FFTW3F/FFTW3 with threading
Use brew to install qt5: brew install qt5
Properly link the installed qt5 brew link --force qt5 ln -s /usr/local/Cellar/qt5/5.x.x/mkspecs /usr/local/mkspecs ln -s /usr/local/Cellar/qt5/5.x.x/plugins /usr/local/plugins
Please note that the 5.x.x depends on the Qt version installed
Get the latest code from github. Follow the instructions to install it via source.
Download Netbeans for C/C++ from https://netbeans.org/downloads/ depending on your platform and install it.
Go to Preferences and C/C++ tab. On the C++ Compiler add the following include directories using the Add button on right. /usr/local/opt/qt5/include/QtCore /usr/local/opt/qt5/include/QtConcurrent /usr/local/opt/qt5/include/QtWidgets /usr/local/opt/qt5/include/QtGui
- Open Netbeans -> File -> New Project -> C/C++ -> C/C++ Project with Existing sources.
- After clicking Next you will be asked to provide a path for your project. Specify the correct path where the git source code was cloned.
- Make sure you DO NOT select "Automatic" in Select Configuration Mode. Choose "Custom" and the click Next.
- Check "Pre build step is required"
- In Run in folder type: /path/to/focus/build
- Clicking on next will take you to Build actions
- The working directory should be: /path/to/focus/build
- Default is good for rest