1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66
| Installing Netbeans with wxWidgets
Install Netbeans
1.Make sure you have the Java Development Kit, if not, download and install the JDK from Sun's website (Uninstall any versions of the Java Runtime Evironment, as a JRE is included in the JDK. )
2.Download MinGW, Msys, and the GNU DeBugger package from http://mingw.org
3.Install MinGW, then install Msys. USE THE DEFAULT SETTINGS!
4.At the end of the Msys installer, it asks to configure it with MinGW. Select yes. The installation folder for MinGW should be c:\MinGW
5.Extract the GDB archive, and copy gdb.exe from the bin folder to C:\MinGW\bin
6.Download and install Netbeans.
7.Add C:\MinGW\bin and C:\msys\1.0\bin (The bin directories for MinGW and Msys) to the PATH System variable, under System Properties (My Computer->Right-click->Properties) -> Advanced, the Evironment Variables button. Separate the directories using a semicolon (;)
Install and compile wxWidgets
1.Download the msi installer for wxWidgets from http://wxWidgets.org
2.Install wxWidgets using default settings.
3.Open the Msys console. (If it isn't installed with a shortcut on the desktop, it is in the Start Menu under Programs ->MinGW->MSYS->msys.exe. )
4.Navigate to the wxWidgets folder (usually wxWidgets-x.x.x (with x.x.x Being the version number)) by typing cd /wxWidgets* (The asterisk lets you skip the version numbers).
5.Create a new folder by typing mkdir [folder name]. For example, I used the folder name build-static-debug. (So I typed mkdir build-static-debug).
6.Navigate to the new folder by typing cd ./[folder name]. I typed cd ./build-static-debug.
7.Configure wxWidgets by using the configure script in the folder below by typing
../configure. I recommend using the following configuration: debug, shared-disabled and unicode enabled. You can configure this configuration by typing
../configure --enable-debug --disable-shared --enable-unicode
8.Compile using the make command: make
9.When make is finished run make install: make install
10.Type rm *.o to remove unneeded files
Set up a Netbeans Project with wxWidgets
1.Open Netbeans.
2.If you are creating a new project, select C/C++ Application, under the C/C++ catagory, name the project whatever you like, and leave all the other options at their defaults. Press Finish.
3.Under the Projects pane, select your project. Right-click, and go to Properties under the menu that pops up.
4.Go back to Msys. Navigate to your compiled wxWidgets folder.
For me: cd /c/wxWidgets*/build-static-debug/
5.Type the wx-config command, with the cxxflags flag.
wx-config --cxxflags
6.In the Project Properties dialog in Netbeans, under C/C++ -> C++ Compiler -> General, enter in the paths that have -I preceeding them (e.g. -I/c/wxWidgets-2.8.7/build-static-debug/lib/wx/include/msw-unicode-debug-static-2.8), by clicking the elipsis (...) button by Include Directories. Navigate to that directory (/c/ is the same as C:\) click on that folder, and click select. Repeat until all the listed directories are entered into Netbeans. Then click OK in the Include Directories dialog. Keep the msys window open.
7.Go to Command Line, under C++ Compiler, and copy the additional output on the msys window by selecting the remaining flags, and pressing Ctrl+C. Go into the Additional Options dialog by pressing the elipsis (...) button next to Additional Options (under C/C++ -> C++ Compiler -> Command Line). In the text box, paste the flags by pressing Ctrl+V.
8.Repeat the process from step 22, with the libs flag.
wx-config --libs
9.Copy the output from msys to Addional Options -> Linker -> Librarys, by selecting the elipsis (...), selecting Add Option, selecting Other Option, and Pasting the flags.
10.Close msys and the Project Properties windows, and you're done.
The project configuration steps also apply to Linux. |
Partager