issues when linking a library that uses boost classes
Hi: I've recently written a library that uses boost classes internally. The library (the release version) uses the visual studio multi-threaded static library. When I try to use the class in another program that uses boost classes it appears the relevant parts of the library don't get linked in. After specifying the lib on the linker tab (i.e the one that I've built) the build goes fine, but I get an excdeption when the app is run. Any ideas? I can replicate this with two projects, visual studio 2008, boost 1.44 release. If anybody wants to take a look at the solution, I'm happy to send off-list. Cheers Sean.
Hello,
On Wed, Sep 8, 2010 at 4:08 PM, Sean Farrow
Hi:
I’ve recently written a library that uses boost classes internally. The library (the release version) uses the visual studio multi-threaded static library. When I try to use the class in another program that uses boost classes it appears the relevant parts of the library don’t get linked in. After specifying the lib on the linker tab (i.e the one that I’ve built) the build goes fine, but I get an excdeption when the app is run. Any ideas?
I can replicate this with two projects, visual studio 2008, boost 1.44 release.
If anybody wants to take a look at the solution, I’m happy to send off-list.
Faced a similar problem when using boost::filesystem sometime back. It was due to using a release build of boost library with debug of my application. When I changed to use a debug library version of boost, the exception/crash disappeared. -dhruva
Hi:
Ok, all project are using the correct multi-threaded versions of the libs any other ideas?
Cheers
Sean.
-----Original Message-----
From: boost-users-bounces@lists.boost.org [mailto:boost-users-bounces@lists.boost.org] On Behalf Of dhruva
Sent: 09 September 2010 05:11
To: boost-users@lists.boost.org
Subject: Re: [Boost-users] issues when linking a library that uses boost classes
Hello,
On Wed, Sep 8, 2010 at 4:08 PM, Sean Farrow
Hi:
I've recently written a library that uses boost classes internally. The library (the release version) uses the visual studio multi-threaded static library. When I try to use the class in another program that uses boost classes it appears the relevant parts of the library don't get linked in. After specifying the lib on the linker tab (i.e the one that I've built) the build goes fine, but I get an excdeption when the app is run. Any ideas?
I can replicate this with two projects, visual studio 2008, boost 1.44 release.
If anybody wants to take a look at the solution, I'm happy to send off-list.
Faced a similar problem when using boost::filesystem sometime back. It was due to using a release build of boost library with debug of my application. When I changed to use a debug library version of boost, the exception/crash disappeared. -dhruva _______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
Hi,
On Thu, Sep 9, 2010 at 10:33 AM, Sean Farrow
Hi: Ok, all project are using the correct multi-threaded versions of the libs any other ideas?
It is debug build of your application _must_ use debug boost libraries and release build should use release libraries. If you could use windbg to get a backtrace and send it across. Also, check the event log if that gives you any hint. Does the application failed to start or crashes with an exception? If it fails to start, there is this famous "SideBySide" error which is due to mismatch/unavailability of right version of MSVC runtime libraries (which can be solved by installing the matching version of MSVCRT (or debug version) and the compiler version you have used. -dhruva
participants (2)
-
dhruva
-
Sean Farrow