Building boost with Dev-C++

Started by
10 comments, last by _the_phantom_ 19 years, 2 months ago
Ok, I've been trying for the past hour or so to convince boost that it wants to build with the version of mingw32 which comes with Dev-C++ (4.9.9.1), however I'm currently stumpped and all my ideas have run out [crying] I've got Dev-C++ installed to D:\Dev-Cpp I opened a command prompt (cmd.exe) Added the path to tools to the system path (path = %path%;d:\dev-cpp\bin) The called bjam with the following command line; G:\Programming\SDKs\boost_1_32_0>bjam "-sTOOLS=mingw" "-sMINGW_ROOT_DIRECTORY=D:\Dev-Cpp" install which promptly dumped out with a error of 'spawn: Invalid argument' Having googled around a bit I landed apon putting -d+4 in the command line to get some debug info, resulting in ; G:\Programming\SDKs\boost_1_32_0>bjam -d+4 "-sTOOLS=mingw" "-sMINGW_ROOT_DIRECTORY=D:\Dev-Cpp" install which gives me;

Executing raw command directly
Executing command ["D:\Dev-Cpp\mingw32\bin\g++"] ["-Wl,--enable-auto-image-base"
] ["-Wl,--exclude-symbols,_bss_end__:_bss_start__:_data_end__:_data_start__"] ["
-Wl,--out-implib,bin\boost\libs\date_time\build\boost_date_time.dll\mingw\debugboost_date_time-mgw-d-1_32.lib"] [-g] [-shared] [-Wl,--allow-multiple-definition
] [-mno-cygwin] [-o] ["bin\boost\libs\date_time\build\boost_date_time.dll\mingwdebug\boost_date_time-mgw-d-1_32.dll"] [-L"D:/Dev-Cpp/mingw32/lib"] ["bin\boostlibs\date_time\build\boost_date_time.dll\mingw\debug\greg_month.obj"] ["bin\boos
t\libs\date_time\build\boost_date_time.dll\mingw\debug\greg_weekday.obj"] ["binboost\libs\date_time\build\boost_date_time.dll\mingw\debug\date_generators.obj"]

spawn: Invalid argument


so, I'm stumpped, anyone got any ideas?
Advertisement
It printed out the command (with each individual command line parameter bracketed with []) - have you tried executing it manually?
"Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it." — Brian W. Kernighan
once I cleaned the command up (removed all the [] and ") and ran it it executed fine

D:\Dev-Cpp\bin\g++ -Wl,--enable-auto-image-base -Wl,--exclude-symbols,_bss_end__:_bss_start__:_data_end__:_data_start__ -Wl,--out-implib,bin\boost\libs\date_time\build\boost_date_time.dll\mingw\debug\boost_date_time-mgw-d-1_32.lib -g -shared -Wl,--allow-multiple-definition -mno-cygwin -o bin\boost\libs\date_time\build\boost_date_time.dll\mingw\debug\boost_date_time-mgw-d-1_32.dll -LD:/Dev-Cpp/lib bin\boost\libs\date_time\build\boost_date_time.dll\mingw\debug\greg_month.obj bin\boost\libs\date_time\build\boost_date_time.dll\mingw\debug\greg_weekday.obj bin\boost\libs\date_time\build\boost_date_time.dll\mingw\debug\date_generators.obj


You might notice a few bits are different, that was down to a bad copy and paste on my part, the above command line came after the output given by the build command I issued in my first post, which compiles 3 .obj correctly via some batch files and then fails on the linking line (which was the same as the line in my first post, just sans the 'minw32' parts of the paths.

So, it works by hand, but not via the bjam interface (which I have used to compile the library successfully for VC7.1 before), but I'm still no closer to understanding why or how to fix it as i dont fancy building the whole thing by hand...
one quick bump to see if anyone else has any ideas, otherwise next stop boost mailing list [smile]
hmm, i just built boost for DevC++ with
bjam "-sMINGW_ROOT_DIRECTORY=D:\Dev-Cpp" "-sTOOLS=mingw" install

but now, i don't really know how to use the lib *ouch*
usually i'd simply include the *.hpp file and copy the *.libs in DevC++' lib-folder.
but the boost libs are scattered in the boost/bin folder and exist in multiple versions...
so: how to use...say...boost:thread?
------------------------------------------------------------Jawohl, Herr Oberst!
Quote:Original post by maximAL
but now, i don't really know how to use the lib *ouch*
usually i'd simply include the *.hpp file and copy the *.libs in DevC++' lib-folder.


Copy the "boost" directory, which contains all the header, to your "include" directory (so that you have include/boost/whatever.hpp)

Quote:but the boost libs are scattered in the boost/bin folder and exist in multiple versions...
so: how to use...say...boost:thread?


At least they're all in the same folder, aren't they - that didn't use to be the case in early versions [grin]

Check here for an explanation of the multiple library versions.
"Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it." — Brian W. Kernighan
Quote:Original post by FrunyAt least they're all in the same folder, aren't they


actually - no. they all got some nice path like:
D:\Programme\Dev-Cpp\boost_1_32_0\bin\boost\libs\thread\build\boost_thread.dll\mingw\release\threading-multi

but someone pointed me to an DevC++ DevPak .
it seems to work for the moment, but i got no idea how good/complete/whatever it is...
------------------------------------------------------------Jawohl, Herr Oberst!
Quote:Original post by maximAL
actually - no. they all got some nice path like:
D:\Programme\Dev-Cpp\boost_1_32_0\bin\boost\libs\thread\build\boost_thread.dll\mingw\release\threading-multi


Look in bin-stage. You may have to use the 'stage' make option instead of 'install'.
"Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it." — Brian W. Kernighan
you say i have to rebuild everythin again with "stage" instead of "install"?
another wasted hour :-/

and btw, can where can i set optimisation stuff for mingw (O3, march...)? i mean, when i'm allready building it...
------------------------------------------------------------Jawohl, Herr Oberst!
Quote:Original post by maximAL
you say i have to rebuild everythin again with "stage" instead of "install"?
another wasted hour :-/


Unless you've trashed the intermediate files, that shouldn't take long...

And actually, looking at the options (on the same page I linked earlier), with "install" the libraries should have ended up in C:\Boost\lib. Reading the documentation before you try and install something not a waste of time.

Quote:and btw, can where can i set optimisation stuff for mingw (O3, march...)? i mean, when i'm allready building it...


The options should be selected for you already. If you want to mess with them, see here, but you're on your own: I've never bothered.
"Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it." — Brian W. Kernighan

This topic is closed to new replies.

Advertisement