forked from cnjinhao/nana-docs
-
Notifications
You must be signed in to change notification settings - Fork 6
Code Blocks Linux
dnso86 edited this page Feb 9, 2019
·
3 revisions
- Click menu Settings->Compiler... to open Global compiler settings dialog. Then, select Search directories->Compiler tab.
- Add "NanaPath/include".
- Add "/usr/include/freetype2" when it is in Linux. (The path of freetype2 may be different, it depends on your system).
- And then, switch to the "Linker" and add "NanaPath/build/codeblocks".
-
Open the "NanaPath/build/codeblocks/nana.cbp"
-
Open "Project->Build options...->Compiler settings->Compiler flags", and enable "-std=c++11"
-
Open "Project->Build options...->Serch Directories->Compiler", and add
$(#nana) and $ (#boost) -
Add the following defines
_enable_std_make_unique _WIN32_WINNT=0x0501 _WIN32_WINNT_WINXP=0x0501 _WIN32_WINNT_VISTA=0x0600 _WIN32_WINNT_WIN7=0x0601
- Buid. The library will be "NanaPath/build/codeblocks/libnana.a"
Create a project, then open "Project->Build options...->Compiler settings->Compiler flags", and enable "-std=c++11". Switch the tab to "Linker settings" in "Project build options", and link these static libraries in "Other linker options".
- lnana -lgdi32 -lcomdlg32
-lnana -lX11 -lpthread -lrt -lXft -lfontconfig
-lpng (if the support of PNG is enabled)
-lasound (if nana::audio::player is called)