Linking with dynamic boost thread library
I build the thread library with the following cmd command: bjam.exe toolset=msvc --with-thread --prefix=C:\boost\ variant=debug,release link=shared install after which I get the following libs: boost_thread-vc80-mt.lib boost_thread-vc80-mt-1_38.dll boost_thread-vc80-mt-1_38.lib boost_thread-vc80-mt-gd.lib boost_thread-vc80-mt-gd-1_38.dll boost_thread-vc80-mt-gd-1_38.lib In my application, I placed #define BOOST_THREAD_DYN_LINK in all the cpp files where thread library is included. I get the following error: LINK : fatal error LNK1104: cannot open file 'libboost_thread-vc80-mt-gd-1_38.lib' How many mistakes have I done?
Hi!
your project file must explicitly link with dynamic C++ runtime. If your
project is set to use static C++ runtime it will use static threading lib.
If you e.g. rename boost_thread-vc80...lib to libboost_... C++ linker will
blame, that you are mixing static and dynamic runtimes.
Regards,
Ovanes
On Wed, Apr 8, 2009 at 3:14 PM, Igor
I build the thread library with the following cmd command: bjam.exe toolset=msvc --with-thread --prefix=C:\boost\ variant=debug,release link=shared install after which I get the following libs:
boost_thread-vc80-mt.lib boost_thread-vc80-mt-1_38.dll boost_thread-vc80-mt-1_38.lib boost_thread-vc80-mt-gd.lib boost_thread-vc80-mt-gd-1_38.dll boost_thread-vc80-mt-gd-1_38.lib
In my application, I placed #define BOOST_THREAD_DYN_LINK in all the cpp files where thread library is included.
I get the following error:
LINK : fatal error LNK1104: cannot open file 'libboost_thread-vc80-mt-gd-1_38.lib'
How many mistakes have I done? _______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
Hi Ovanes, My project is set to Multi threaded debug dll. (options/c++/code generations/runtime library in VS2005) I used to link against static boost thread libraries until now with the same setting without any problems. I switched to dynamic thread libraries in order to solve the hook problem with the _pRawDllMain pointer which was introduced in 1.37. This hook interferes with MFC. I don't know why the compiler is looking for a lib... when I #define BOOST_THREAD_DYN_LINK ? Is there some other setting in the IDE where I should be pointing out that I want to link to a dynamic thread library? Ovanes Markarian wrote:
Hi!
your project file must explicitly link with dynamic C++ runtime. If your project is set to use static C++ runtime it will use static threading lib. If you e.g. rename boost_thread-vc80...lib to libboost_... C++ linker will blame, that you are mixing static and dynamic runtimes.
Regards, Ovanes
On Wed, Apr 8, 2009 at 3:14 PM, Igor
wrote: I build the thread library with the following cmd command: bjam.exe toolset=msvc --with-thread --prefix=C:\boost\ variant=debug,release link=shared install after which I get the following libs:
boost_thread-vc80-mt.lib boost_thread-vc80-mt-1_38.dll boost_thread-vc80-mt-1_38.lib boost_thread-vc80-mt-gd.lib boost_thread-vc80-mt-gd-1_38.dll boost_thread-vc80-mt-gd-1_38.lib
In my application, I placed #define BOOST_THREAD_DYN_LINK in all the cpp files where thread library is included.
I get the following error:
LINK : fatal error LNK1104: cannot open file 'libboost_thread-vc80-mt-gd-1_38.lib'
How many mistakes have I done? _______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
-- View this message in context: http://www.nabble.com/Linking-with-dynamic-boost-thread-library-tp22950286p2... Sent from the Boost - Users mailing list archive at Nabble.com.
AMDG Igor MI wrote:
My project is set to Multi threaded debug dll. (options/c++/code generations/runtime library in VS2005) I used to link against static boost thread libraries until now with the same setting without any problems. I switched to dynamic thread libraries in order to solve the hook problem with the _pRawDllMain pointer which was introduced in 1.37. This hook interferes with MFC.
I don't know why the compiler is looking for a lib... when I #define BOOST_THREAD_DYN_LINK ? Is there some other setting in the IDE where I should be pointing out that I want to link to a dynamic thread library?
https://svn.boost.org/trac/boost/ticket/2874 In Christ, Steven Watanabe
Thanks. But now I wonder about what Ovanes said. Why did I linked successfully with static thread library when my project is set to multi threaded debug dll? Steven Watanabe-4 wrote:
AMDG
Igor MI wrote:
My project is set to Multi threaded debug dll. (options/c++/code generations/runtime library in VS2005) I used to link against static boost thread libraries until now with the same setting without any problems. I switched to dynamic thread libraries in order to solve the hook problem with the _pRawDllMain pointer which was introduced in 1.37. This hook interferes with MFC.
I don't know why the compiler is looking for a lib... when I #define BOOST_THREAD_DYN_LINK ? Is there some other setting in the IDE where I should be pointing out that I want to link to a dynamic thread library?
https://svn.boost.org/trac/boost/ticket/2874
In Christ, Steven Watanabe
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
-- View this message in context: http://www.nabble.com/Linking-with-dynamic-boost-thread-library-tp22950286p2... Sent from the Boost - Users mailing list archive at Nabble.com.
What I mean is the reversed order. You can not link the static runtime and
dynamic boost_thread or any other lib.
On Wed, Apr 8, 2009 at 4:50 PM, Steven Watanabe
AMDG
Igor MI wrote:
But now I wonder about what Ovanes said. Why did I linked successfully with static thread library when my project is set to multi threaded debug dll?
You can link using the dll runtime and the static boost_thread.
In Christ, Steven Watanabe http://lists.boost.org/mailman/listinfo.cgi/boost-users
I'm having a similar problem with my project. I'd like to use the dlls but
no matter what, the compile warns me that it "cannot open file
'boost_regex-vc80-mt-gd-1_38.lib'"
I'm trying to find where I can set the project (in vis studio 2005) to use
the dynamic link libraries as opposed to the static. Based on previous
entries in this thread, I assume that is the first step that I need to take.
Can someone tell me where to set this?
Jason
From: boost-users-bounces@lists.boost.org
[mailto:boost-users-bounces@lists.boost.org] On Behalf Of Ovanes Markarian
Sent: Wednesday, April 08, 2009 11:01 AM
To: boost-users@lists.boost.org
Subject: Re: [Boost-users] Linking with dynamic boost thread library
What I mean is the reversed order. You can not link the static runtime and
dynamic boost_thread or any other lib.
On Wed, Apr 8, 2009 at 4:50 PM, Steven Watanabe
participants (5)
-
Green, Jason M NSWCDL, W33
-
Igor
-
Igor MI
-
Ovanes Markarian
-
Steven Watanabe