|
View:
New views
5 Messages
—
Rating Filter:
Alert me
|
|
|
statically link project with Boost libs in Cygwin/msvcHi, I am linking my project statically with boost_rexeg in Cygwin, using toolset msvc. But my executable still looks for boost_regex when I run it. Also, it shows boost_regex when I run depends.exe on it. Is this normal? Coming from Linux, I would expect no dependency on boost_regex (boost_regex does not show for ldd on the binary). How can I remove these dependencies? Thank you, Andrej _______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost-build |
|
|
Re: statically link project with Boost libs in Cygwin/msvcOn Friday 12 June 2009 Andrej van der Zee wrote:
> > Hi, > > I am linking my project statically with boost_rexeg in Cygwin, using toolset msvc. What do you mean "statically", exactly? How are you linking to boost_regex? > But my executable still looks for boost_regex when I run it. > Also, it shows boost_regex when I run depends.exe on it. > Is this normal? Do you have BOOST_ALL_DYN_LINK or BOOST_REGEXP_DYN_LINK in compiler settings, perchance? - Volodya _______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost-build |
|
|
|
|
|
Re: statically link project with Boost libs in Cygwin/msvcOn Friday 12 June 2009 Andrej van der Zee wrote:
> > Hi, > > Thanks for your quick reply, as always. > > Below the Jamfile for my executable and the ouput of bjam -d2. > On Linux it statically links as I expect. On Cygwin/Windows/msvc > it holds it dependencies on the boost libs. But I am not sure what > to expect, since I am not so proficient on Windows. > > Thank you, > Andrej > > > $ cat Jamfile > project : requirements > <os>CYGWIN:<define>_WIN32_WINNT=0x0501 > <os>CYGWIN:<library-path>/usr/local/lib > ; > > exe cap2net > : [ glob *.cpp ] > /site-config//boost_regex > /site-config//boost_serialization > /site-config//boost_date_time > : <link>static > : <define>BOOST_REGEX_RECURSIVE > ; > > install $(INSTALL_PATH)/bin : cap2net ; > > $ bjam -d2 > ...patience... > ...found 1196 targets... > ...updating 2 targets... > > file bin\msvc-9.0\debug\link-static\threading-multi\cap2net.exe.rsp > > "bin/msvc-9.0/debug/link-static/threading-multi/main.obj" > > "boost_regex-vc90-mt-gd-1_38.lib" This is not static library. It is import library for DLL, therefore it's natural that your library links to DLL. The static library would be named "libboost_regex-vc90-mt-gd-1_38.lib" I think the declarations in site-config have to be appropriately modified. E.g: searched-lib boost_regex: : <link>shared:<name>boost_regex-vc90-mt-gd-1_38 <link>static:<name>libboost_regex-vc90-mt-gd-1_38 ; Note that using <name> conditionally as above requires that you use shared-lib as opposed to lib, as otherwise auto-detection of 'this is actually searched lib' might not work. 'searched-lib' is the recommended spelling anyway now. Does this help? - Volodya _______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost-build |
|
|
|
| Free embeddable forum powered by Nabble | Forum Help |