开发者

Debugging cplex project in Visual Studio 2010

I cannot compile my c++ project cplex libraries on visual studio.

The versions are cplex 122 and visual studio 2010 on windows 7 the cplex header I use is

<ilcplex/ilocplex.h>

the cplex libraries linked are

C:\ILOG\CPLEX_Studio_AcademicResearch122\cplex\lib\x64_windows_vs2010\stat_mta\cplex122.lib
C:\ILOG\CPLEX_Studio_AcademicResearch122\cplex\lib\x64_windows_vs2010\stat_mta\ilocplex.lib
C:\ILOG\CPLEX_Studio_AcademicResearch122\concert\lib\x64_windows_vs2010\stat_mta\concert.lib

All the necessary settings are done for release setting, It compiles and runs without any problems (where I do not encounter my programming bugs)

However, I tried the things on this webpage, and the error I get is many ti开发者_开发知识库mes the following

error LNK2038: mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '0' doesn't match value '2' in graph.obj    ..\ilocplex.lib(ilocplex.obj)

By the way, graph.obj is my own object file


You can't link external libraries in VS2010 that are compiled with a different value of _ITERATOR_DEBUG_LEVEL. Since you don't have the ability to build a debug version cplex (which would set _ITERATOR_DEBUG_LEVEL to 2) you'll need to set _ITERATOR_DEBUG_LEVEL to 0 for all of your projects that link with cplex.

See http://msdn.microsoft.com/en-us/library/aa985982.aspx for some background information about _ITERATOR_DEBUG_LEVEL

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜