Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

LNK2038: mismatch detected for 'boost_log_abi': value 'v2s_mt_nt5' doesn't match value 'v2s_mt_nt6'

After creating separate header file which consists of boost libraries, then I try to include in existing project.

But it shows the following error:

 ::  Error  15  error LNK2038: mismatch detected for 'boost_log_abi':
 value 'v2s_mt_nt5' doesn't match value 'v2s_mt_nt6' in BoostLogger.obj 
 E:\Projects\native\dcnotificationserver\loggerutil.obj  ::

I know that previous project works from Windows XP to Current Windows OS (i.e.)10 .

But I read that boost supports from Windows XP.

What is the problem?

How to solve it?

I think the problem due to windows version?

For further information, please ask me.

EDIT:
I'm using:
Compiler: msvc 10
Boost version: 1.60
Visual Studio 2010

like image 890
Arun kumar Kalaiarasan Avatar asked Mar 10 '16 07:03

Arun kumar Kalaiarasan


3 Answers

I encountered a similar problem after upgrading both BOOST to 1.60 and Visual Studio to 2015.

I resolved it by changing/defining the _WIN32_WINNT definition in the preprocessor to be 0x601 vice 0x501.

I'm pretty sure this means...support Win7 and greater vice XP.

like image 116
John Avatar answered Nov 20 '22 08:11

John


There is another solution with out changing to old build.

You can use any build of boost library:

b2 link=static runtime-link=static --toolset=msvc-10.0 define=BOOST_USE_WINAPI_VERSION=0x0500

It solve my problem when I used MS Visual Stdio 2010. You can also try with this.

like image 1
Thiyaga Avatar answered Nov 20 '22 09:11

Thiyaga


According to me, there are two solutions for this problem.

1) Use boost 1.58 instead of using boost 1.60.
   [Note : you cannot use latest functions.]

2) Otherwise you can extract the files in boost 1.60 by using the cmd :
    b2 release define=BOOST_USE_WINAPI_VERSION=0x0501

See here for more details :
http://www.boost.org/users/history/version_1_60_0.html

like image 1
Arun kumar Kalaiarasan Avatar answered Nov 20 '22 08:11

Arun kumar Kalaiarasan