forked from cnjinhao/nana-docs
-
Notifications
You must be signed in to change notification settings - Fork 6
Nana in Eclipse
ducklin5 edited this page Feb 21, 2016
·
5 revisions
This is in no way going to be a precise step by step tutorial. Some general knowledge is presumed.
I recommend using TDM-GCC instead of MinGW because TDM-GCC has the later versions of the tools needed to build nana 1.3.
Note MinGW most probably wont work anyway, unless it is updated in the future.
- Download and or use git to get the source code of nana and extract it to where you want (ie C:\libs\nana). This will be the source code folder
- Install TDM-GCC as per the gui installer:
- For 64 bit:
- Create ==> MinGW-w64/TDM64 (32-bit and 64-bit) ==> TDM-GCC - For 32 bit
- Create ==> MinGW/TDM (32-bit) ==> TDM-GCC.
- make sure gcc and g++ are installed by running 'g++ --version' in cmd
- open cmake gui
-
download it if you don't already have it installed
-
download it if you don't already have it installed
- input the source code folder (root of nana folder, the one we previous got from git or extracted. C:\libs\nana).
- input the build folder (where you want the library to be built), ie: "C:\libs\nana\build\bin\eclipse" or "C:\libs\nana\build\bin\netbeans" etc .
- click configure
- ** optionally you can change some options. Pun intended π
- click Generate
- In cmd (I used git bash though): cd to the build folder and run mingw32-make (or make if the former doesn't work).
-
Using the library in eclipse
- when you create a new C++ nana project in eclipse make sure you are using the TDM-GCC tool-chain previously installed.
- create a new C++ project
- right click on the new project and click properties
- go to C/C++ General > Paths and Symbols > Includes > GNU C++ > add a new entry: the path to the nana include folder (ie C:/libs/nana/include)
- go to C/C++ General > Paths and Symbols > Symbols > GNU C++ > add 2 entries: NANA_MINGW and NANA_UNICODE
- go to C/C++ General > Paths and Symbols > Libraries > add 3 entries: nana , gdi32 and comdlg32
- go to C/C++ General > Paths and Symbols > Library Paths > add a new entry: the path to the build folder (ie C:\libs\nana\build\bin\eclipse)