Hello, I have previously successfully compiled and built the dynamic boost.log libraries with MSVC-8.0, along with a few test programs that were linking to the boost libs dynamically. The test program was built and ran fine. I have now built boost.log static libraries with MSVC-10.0 without issue, yet my test program is now failing to build when attempting to link statically. See attachment for specific errors. It seems as though the project is including the headers with the <dllimport> tag, though my MSVC-10.0 project does not have BOOST_ALL_DYN_LINK or BOOST_LOG_DYN_LINK macro defined. Is there some way I need to signal my project that I'm using boost.log statically? Thanks, Jonathan ________________________________ This e-mail and any attachments are confidential. If it is not intended for you, please notify the sender, and please erase and ignore the contents.
I have previously successfully compiled and built the dynamic boost.log libraries with MSVC-8.0, along with a few test programs that were linking to the boost libs dynamically. The test program was built and ran fine. I have now built boost.log static libraries with MSVC-10.0 without issue, yet my test program is now failing to build when attempting to link statically. See attachment for specific errors.
It seems as though the project is including the headers with the <dllimport> tag, though my MSVC-10.0 project does not have BOOST_ALL_DYN_LINK or BOOST_LOG_DYN_LINK macro defined. Is there some way I need to signal my project that I’m using boost.log statically?
Boost.Log was built with "runtime-link=shared" option, while (I guess) your project links CRT statically. Change /MT (or /MTd) option in your project to /MD (/MDd), or build boost with "runtime-link=static".
The release and debug projects are set to compile with /MD and /MDd flags, respectively, and it seems the linker is including the appropriate versions of the libs: 1> Searching ../lib/\libboost_system-vc100-mt-gd-1_53.lib: 1> Searching ../lib/\libboost_date_time-vc100-mt-gd-1_53.lib: 1> Searching ../lib/\libboost_regex-vc100-mt-gd-1_53.lib: 1> Searching ../lib/\libboost_thread-vc100-mt-gd-1_53.lib: 1> Searching ../lib/\libboost_chrono-vc100-mt-gd-1_53.lib: 1> Searching ../lib/\libboost_log-vc100-mt-gd-1_53.lib: 1> Searching ../lib/\libboost_filesystem-vc100-mt-gd-1_53.lib: 1> Searching C:\Program Files\Microsoft Visual Studio 10.0\VC\lib\MSVCRT.lib: 1> Searching C:\Program Files\Microsoft Visual Studio 10.0\VC\lib\MSVCRTD.lib: -----Original Message----- From: Boost-users [mailto:boost-users-bounces@lists.boost.org] On Behalf Of Igor R Sent: Monday, April 22, 2013 2:10 PM To: boost-users@lists.boost.org Subject: Re: [Boost-users] boost.log linker issue
I have previously successfully compiled and built the dynamic boost.log libraries with MSVC-8.0, along with a few test programs that were linking to the boost libs dynamically. The test program was built and ran fine. I have now built boost.log static libraries with MSVC-10.0 without issue, yet my test program is now failing to build when attempting to link statically. See attachment for specific errors.
It seems as though the project is including the headers with the <dllimport> tag, though my MSVC-10.0 project does not have BOOST_ALL_DYN_LINK or BOOST_LOG_DYN_LINK macro defined. Is there some way I need to signal my project that I’m using boost.log statically?
Boost.Log was built with "runtime-link=shared" option, while (I guess) your project links CRT statically. Change /MT (or /MTd) option in your project to /MD (/MDd), or build boost with "runtime-link=static". _______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users ________________________________ This e-mail and any attachments are confidential. If it is not intended for you, please notify the sender, and please erase and ignore the contents.
participants (2)
-
Igor R
-
Jonathan Walker