Boost logo

Boost Users :

Subject: Re: [Boost-users] How to choose which library version to choose?
From: Georg Leidinger (georg.leidinger_at_[hidden])
Date: 2013-10-09 10:04:16


Like Kris explained, these are the same libraries created for different use
cases. I hope you know already, that a library in C++ can be linked
statically to a project or loaded dynamically during runtime. Here
http://www.boost.org/doc/libs/1_54_0/more/getting_started/windows.html you
can find an explanation of the different lib names see 6.3 Library Naming.

If you wanna use a library in your application you have to specify the path
where the compiler will look for libraries and you have to define which
library you want to use. How and where you define these values depends on
the IDE (Eclipse, Visual Studio, XCode) you are using. Usually there is
something like Linker Flags where you define which library should be linked
and Library Search Path where you specify where the compiler will look for
additional libraries, at least in XCode.

I link the boost libs statically to my projects, because otherwise the .dll
files for the libs I used must be delivered together with the binary which
I don't like so much.

Cheers
Georg

2013/10/9 Krzysztof Czainski <1czajnik_at_[hidden]>

> 2013/10/9 Michael Kragh Pedersen <m_kragh_pedersen_at_[hidden]>
>
>> I have downloaded and built the Boost library, as according to these
>> instructions:
>>
>> http://theseekersquill.wordpress.com/2010/08/24/howto-boost-mingw/
>>
>> I need to use the serialization library, so I looked at the stage\lib
>> folder, only to 16 different library files! Some are named mt, some sd,
>> some s or d, and some a combination thereof, all this following
>> libboost_serialization-mgw48. Some are dll files and some are a files.
>>
>
> Those are different variants of the same library; you should choose one
> variant, and link to that variant only.
>
> -mt means multithreading
> -s means static (I think)
> -d means debug
> -sd probably means static debug
>
>
>> I tried using –lboost_serialization, as I have seen this mentioned on a
>> lot of forums, but Eclipse says it can’t find that library. So how on Earth
>> am I supposed to figure out which of the many files to link to?!
>>
>
> If you want the static single-threading non-debug version, you probably
> need something like -lboost_serialization-s-mgw48 -LX:\path\to\boost\libs
>
> HTH,
> Kris
>
> _______________________________________________
> Boost-users mailing list
> Boost-users_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/boost-users
>



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