Bonjour le forum C++,
Voilà, je souhaiterais installer la librairie nana c++ pour pouvoir créer une interface graphique. En fait le but visé est de construire un jeu petit à petit (projet personnel). Cette bibliothèque m'a convaincu parce qu'elle me semble assez moderne (c++11) et fortement orientée objet.
Maintenant, plus précisément:
- Je travaille sur Window 8.1 ou 10
- Mon IDE est Code::block 16.01
- La version de nana que je veux utiliser est nana 1.3.0
- Pour être compatible c++11, nana a besoin de la bibliothèque boost. A cet effet, j'ai téléchargé la version boost 1.60.0
Pour l'installer, j'ai tenté de suivre les instructions d'installation ici.
Mais je bloque sur les points suivants:2. Compile Nana C++ Library
MinGW
Configure the Boost C++ Library for Nana.C++11(Skip this step if you are installing Nana.C++03)
The Boost C++ Library is required due to <thread>, <mutex> and <condition_variable> being not supported by MinGW 4.7.x
a, Insert the Boost includ directory to the "Settings->Compiler...->Search directories->Compiler".
b, Append the MinGW path(e.g "C:\Program Files\CodeBlocks\MinGW\bin") to the "Path" which is one of Global Environment Variables.
c, Open the "BoostPath/boost/thread/detail/config.hpp" header file and find the following lines.
# if defined(BOOST_THREAD_PATH_WIN32)
# if defined(BOOST_MSVC) || defined(BOOST_INTEL_WIN)
and modify
# if defined(BOOST_THREAD_PATH_WIN32)
# if defined(BOOST_MSVC) || defined(BOOST_INTEL_WIN) || defined(__MINGW32__) || defined(MINGW32) || defined(BOOST_MINGW32)
d, Compile the Boost.Thread
bjam toolset=gcc --build-type=complete --with-thread
e, Add the Boost C++ Libraries to the Code::Blocks.
"Settings->Compiler...->Linker Settings" add libraries as following order.
libboost_system-mgwXX-mt-s-XXX.a
libboost_thread-mgwXX-mt-s-XXX.a
libboost_chrono-mgwXX-mt-s-XXX.a
(Wrong order may cause "undefined reference" linker errors)
- Point b: Je ne vois pas où et comment ajouter le MinGW path
- Dans le header config.hpp, je ne trouve pas la variable BOOST_THREAD_PATH_WIN32. Ce qui s'en rapproche le plus est la variable BOOST_THREAD_PLATFORM_WIN32 ligne 398 et du coup pour moi la modification serait déjà d'application...
- Je ne comprends pas du tout le point d. A quoi fait référence Compile the Boost.Thread ainsi que bjam toolset?
- J'imagine que le point e devient clair une fois que les points a à d ont pu être effectués.
J'espère être assez précis et merci d'avance pour toute aide![]()
Partager