Codeblocks
Added by Kubilay Kaan over 13 years ago
Hello,
I am try to generate makefiles for my mngw compiler with the cmake gui.
But to tell cmake where my boost is, is damn hard job. I try all version and variations with different pathes
I set BOOST_ROOT, BOOST_INCLUDEDIR etc. but nothing helps. I still get
Unable to find the requested Boost libraries.
Unable to find the Boost header files. Please set BOOST_ROOT to the root
directory containing Boost or BOOST_INCLUDEDIR to the directory containing
Boost's headers.
Call Stack (most recent call first):
CMakeLists.txt:3 (find_package)
-- Configuring incomplete, errors occurred!
Could anybody help me??
Replies (6)
RE: Codeblocks - Added by Wim Dumon over 13 years ago
There's 2 ways incorportated in Wt to find boost: The one included in cmake, and one we added because the one in cmake doesn't find all boosts. I guess you have to go for the second option.
If you only set BOOST_PREFIX, you use the CMake procedures to detect boost.
The other method is used when you also define BOOST_COMPILER or BOOST_VERSION. Look at the format of your boost libraries to decide what you should put in those variables: in case of libboost_regex-vc100-mt-1_47, BOOST_COMPILER is vc_100 and BOOST_VERSION is 1_47. If that still doesn't work, look into CMakeCache.txt and cmake/WtFindBoost-vintage.txt - you may need to fiddle a bit with that file to make it work (boost comes in many names and places), but it works 90% of the cases 'as is'.
By the way, did you read this:
http://redmine.emweb.be/projects/wt/wiki/Installing_Wt_on_MinGW
Best regards,
Wim.
RE: Codeblocks - Added by Kubilay Kaan over 13 years ago
Yes I do it like in the Link.
So I do following:
cmake D:/Dropbox/it_sw/Wt/WStackedWidget
-DBOOST_ROOT=d:/LIBS/boost
-DBOOST_INCLUDEDIR=d:/LIBS/boost/include/boost-1_47
-DBOOST_DIR=d:/LIBS/boost
-DBOOST_COMPILER=mgw45
-DBOOST_VERSION=1_47 -G "CodeBlocks - MinGW Makefiles"
and thats the result:
-- The C compiler identification is GNU
-- The CXX compiler identification is GNU
-- Check for working C compiler: C:/QtSDK/mingw/bin/gcc.exe
-- Check for working C compiler: C:/QtSDK/mingw/bin/gcc.exe -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: C:/QtSDK/mingw/bin/g++.exe
-- Check for working CXX compiler: C:/QtSDK/mingw/bin/g++.exe -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Boost version: 1.47.0
-- Found the following Boost libraries:
-- date_time
-- regex
-- program_options
-- signals
-- system
-- filesystem
-- thread
-- Configuring done
-- Generating done
CMake Warning:
Manually-specified variables were not used by the project:
BOOST_COMPILER
BOOST_DIR
-- Build files have been written to: D:/Dropbox/it_sw/Wt/WStackedWidget
The Makefile contains no debug or release rule. I never use cmake before so whats the clue here??
RE: Codeblocks - Added by Wim Dumon over 13 years ago
Look in CMakeCache.txt (in your build directory). Was there any boost library found?
Can you list the files in d:/lib/boost/lib?
Wim.
RE: Codeblocks - Added by Kubilay Kaan over 13 years ago
Yes:
libboost_date_time-mgw44-mt-1_47.a
libboost_date_time-mgw44-mt-d-1_47.a
libboost_filesystem-mgw44-mt-1_47.a
libboost_filesystem-mgw44-mt-d-1_47.a
libboost_program_options-mgw44-mt-1_47.a
libboost_program_options-mgw44-mt-d-1_47.a
libboost_regex-mgw44-mt-1_47.a
libboost_regex-mgw44-mt-d-1_47.a
libboost_signals-mgw44-mt-1_47.a
libboost_signals-mgw44-mt-d-1_47.a
libboost_system-mgw44-mt-1_47.a
libboost_system-mgw44-mt-d-1_47.a
libboost_thread-mgw44-mt-1_47.a
libboost_thread-mgw44-mt-d-1_47.a
there is it!
Hmm Is anybody out there who uses mingw as toolchain?
RE: Codeblocks - Added by Wim Dumon over 13 years ago
You specify
-DBOOST_COMPILER=mgw45
but your files tell me that it should be mgw44
libboost_date_time-mgw44-mt-1_47.a
I also see that at least the boost.random library is missing from your build - it is required for boost 1.47. I just modified the wiki to include it.
Mingw is not a popular platform (I think), but is a target that we build every day no our build server.
BR,
Wim.
RE: Codeblocks - Added by Kubilay Kaan over 13 years ago
Thank you,
I don´t make any extra attempt to ignore the random lib. I just compile boost fully with the given command.
But now I change to the msvc version under Windows7. I think it is a lot easier to compile all the dependecies under msvc. That means I compile boost for msvc and wt and the dependencies with mscv without the examples.
The next step for me is to get an overview about the modules in wt and how I create an empty project for wt and linking it to the wt lib etc. Cmake makes me crazy .
further details will follow later.
BR
Efendioglu