Boost logo

Boost Users :

From: Rene Rivera (grafikrobot_at_[hidden])
Date: 2007-05-10 10:47:13


John Pye wrote:
> Rene Rivera wrote:
>> John Pye wrote:
>>
>> 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.

Yep :-) The default build and install behavior on Windows is designed to
mostly follow the Unix behavior. The one exception is the top level
install location. Since there is no *standard* system location it
installs to a recognizable location.

> 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?

Yes that's the reason.

> But in that case wouldn't it be neater
> to use c:\Boost1331, c:\Boost114 or whatever, similar to Python?

Perhaps. But then it would mean changing the install structure across
platforms. Which means more documentation.

> Perhaps it would be good if there were (a) a binary installer for MinGW
> users.

Sure, and we welcome others in making such packages available.

> Would presumably be bound to a specific version of GCC, but
> otherwise portable?

It would be bound to the version of MinGW which means more than just the
version of GCC. In particular it would be bound to the versions of any
libraries and headers that Boost uses.

>>> 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
>
> Perhaps I am supposed to add -mgw to my library name? That seems like a
> strange design choice? What I am doing wrong?

I don't know what Scons may be doing in addition to just adding the -l
option. But yes, you need to specify the a specific variant of the
libraries built. The getting started guide has a section describing the
names of libraries generated. As for the design choice... It's a
requirement as many options in compiling C++ programs changes the ABI
and code compatibility.

-- 
-- Grafik - Don't Assume Anything
-- Redshift Software, Inc. - http://redshift-software.com
-- rrivera/acm.org - grafik/redshift-software.com
-- 102708583/icq - grafikrobot/aim - grafikrobot/yahoo

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