OT: VS 11 build problem

W

woodbrian77

I'm in the process of updating this page --
http://webEbenezer.net/comparison.html -- that compares
the performance between the serialization library in Boost
with results from the C++ Middleware Writer.

I've updated the Linux results already, but am having a
problem getting a test case to build on Windows 7. Previously
with VS 10 I used:

cl -O2 -I /Users/Store/boost_1_50_0_beta1/ -EHsc bser.cc /link /nodefaultlib:msvcprt /nodefaultlib:libcmt libboost_serialization-vc110-1_50.lib

The version of Boost was an earlier one, but other than that
the command is the same. When I use that command with
VS 11 I get errors like this:

libboost_serialization-vc110-1_50.lib(basic_archive.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MD_DynamicRelease' doesn't match value 'MT_StaticRelease' in bser.obj

I built the serialization library in Boost with this command:
bjam variant=release link=static

Any ideas on how to resolve this? Tia.
 
G

Geoff

I'm in the process of updating this page --
http://webEbenezer.net/comparison.html -- that compares
the performance between the serialization library in Boost
with results from the C++ Middleware Writer.

I've updated the Linux results already, but am having a
problem getting a test case to build on Windows 7. Previously
with VS 10 I used:

cl -O2 -I /Users/Store/boost_1_50_0_beta1/ -EHsc bser.cc /link /nodefaultlib:msvcprt /nodefaultlib:libcmt libboost_serialization-vc110-1_50.lib

The version of Boost was an earlier one, but other than that
the command is the same. When I use that command with
VS 11 I get errors like this:

libboost_serialization-vc110-1_50.lib(basic_archive.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MD_DynamicRelease' doesn't match value 'MT_StaticRelease' in bser.obj

I built the serialization library in Boost with this command:
bjam variant=release link=static

Any ideas on how to resolve this? Tia.

You have built the library as statically linked (/MT switch) and you
built the application as dynamically linked (/MD). Change the project
settings.
 
W

woodbrian77

You have built the library as statically linked (/MT switch) and you
built the application as dynamically linked (/MD).

I tried adding MT when building the application like this:

cl -MT -O2 -I /Users/Store/boost_1_50_0_beta1/ -EHsc bser.cc /link /nodefaultlib:msvcprt /nodefaultlib:libcmt libboost_serialization-vc110-1_50.lib

But that didn't seem to help -- I still got the same errors.
Change the project
settings.

I'm not using an IDE.


Brian
Ebenezer Enterprises
http://webEbenezer.net
 
W

woodbrian77

By any chance are you mixing debug and release versions of libraries in a
single build? I ran into a similar problem when moving from VS2008 to
VS2010. I'd been mixing debug & release all along but didn't know it (and
it didn't matter, apparently) until I moved to VS2010.

I'm not sure how to tell.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,020
Latest member
GenesisGai

Latest Threads

Top