|
Boost Users : |
From: John Pye (john.pye_at_[hidden])
Date: 2007-05-10 02:10:36
Rene Rivera wrote:
> John Pye wrote:
>
>> Hi all,
>>
>> Is there such a thing as a binary for Boost under MinGW? As far as I can
>> tell, the correct way to get started with Boost on MinGW is to download
>> the .EXE installer, unpack to c:\Boost, then run
>>
>> bjam "-sMINGW_ROOT_DIRECTORY=c:\MinGW" "-sTOOLS=mingw" install
>>
>> I found that this didn't install the libraries where I expected, however.
>>
>
> Where did it install them to? And where did you expect them?
>
I just assumed that because I was specifying MinGW, it would install the
files in the MinGW file tree. My assumption was wrong: If I want that I
have to specify --prefix=c:\MinGW, it seems.
The files were installed to c:\Boost, but again this was a little
not-as-expected: it installs to c:\Boost\include\boost-1_33_1\boost. Why
not just to c:\Boost\include\boost ? I guess this is so that you can
have multiple versions present? But in that case wouldn't it be neater
to use c:\Boost1331, c:\Boost114 or whatever, similar to Python?
>> I found this comment:
>> http://www.mpi-inf.mpg.de/~dfischer/manual/manual_topic38.html#topic41
>>
>> which says that I have to do a bunch of manual file moving/renaming. Is
>> that right? Really? There must be a better way, surely?
>>
>
> That document is wrong in the general case (it may be some strange
> requirement of that alwis project). There should be no need to rename,
> relocate, or otherwise post process the libraries generated from the
> regular Boost build.
>
Perhaps it would be good if there were (a) a binary installer for MinGW
users. Would presumably be bound to a specific version of GCC, but
otherwise portable?
>> Please let me know if I'm missing something, or if there is a better way
>> to get started with Boost under MinGW/MSYS.
>>
>
> Is there something is specific that isn't working for you? Any errors?
> Did you add the "c:\Boost\lib" dir to your library search path?
>
The specific problem I'm having now is that the libraries don't work for
me. Here is a snippet from my SCons output:
scons: Configure: Checking for Boost libraries...
.sconf_temp\conftest_6.cpp <-
|
|#include <sstream>
|#include <boost/archive/text_oarchive.hpp>
|#include <boost/archive/text_iarchive.hpp>
|
|int main(void){
| std::stringstream ss;
| int x1=1;
| const int &x = x1;
| boost::archive::text_oarchive oa(ss);
| oa & x;
| return 0;
|}
|
g++ -o .sconf_temp\conftest_6.o -c -g -Wall -IC:\mingw\include
-IC:\Boost\include\boost-1_33_1 .sconf_temp\conftest_6.cpp
g++ -o .sconf_temp\conftest_6.exe .sconf_temp\conftest_6.o
-LC:\mingw\lib -LC:\Boost\lib -lcppunit -lgcov -lgsl -lgslcblas -lm
-lboost_serialization
c:\MinGW\bin\..\lib\gcc\mingw32\3.4.2\..\..\..\..\mingw32\bin\ld.exe:
cannot find -lboost_serialization
collect2: ld returned 1 exit status
scons: Configure: no
Do I need to link to something with -mgw (???) in the name, or is the
linker just supposed to work int out?scons: Configure: Checking for
Boost libraries...
.sconf_temp\conftest_6.cpp <-
|
|#include <sstream>
|#include <boost/archive/text_oarchive.hpp>
|#include <boost/archive/text_iarchive.hpp>
|
|int main(void){
| std::stringstream ss;
| int x1=1;
| const int &x = x1;
| boost::archive::text_oarchive oa(ss);
| oa & x;
| return 0;
|}
|
g++ -o .sconf_temp\conftest_6.o -c -g -Wall -IC:\mingw\include
-IC:\Boost\include\boost-1_33_1 .sconf_temp\conftest_6.cpp
g++ -o .sconf_temp\conftest_6.exe .sconf_temp\conftest_6.o
-LC:\mingw\lib -LC:\Boost\lib -lcppunit -lgcov -lgsl -lgslcblas -lm
-lboost_serialization
c:\MinGW\bin\..\lib\gcc\mingw32\3.4.2\..\..\..\..\mingw32\bin\ld.exe:
cannot find -lboost_serialization
collect2: ld returned 1 exit status
scons: Configure: no
Perhaps I am supposed to add -mgw to my library name? That seems like a
strange design choice? What I am doing wrong?
Cheers
JP
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net