Originally posted by: TalRaviv
The documentation for using IBM ILOG CPLEX with Microsoft Visual C++Visual explains how to define a project in "win32 release" mode should be created.
I'm trying to compile and link my model as "win32 debug" mode to enable debuging the code.
I'm using Visual C++ 2008 express .
It seems that there is a conflict between some compliled functions in the debug version libcmt.lib and the realase one that is used by the libraries provided with cplex.
I get the following error messages
1>------ Build started: Project: TS_BSRP, Configuration: Debug Win32
1>Linking...
1>LIBCMT.lib(invarg.obj) : error LNK2005: __initp_misc_invarg already defined in LIBCMTD.lib(invarg.obj)
1>LIBCMT.lib(invarg.obj) : error LNK2005: __invoke_watson already defined in LIBCMTD.lib(invarg.obj)
1>LIBCMT.lib(invarg.obj) : error LNK2005: __set_invalid_parameter_handler already defined in LIBCMTD.lib(invarg.obj)
1>LIBCMT.lib(invarg.obj) : error LNK2005: __get_invalid_parameter_handler already defined in LIBCMTD.lib(invarg.obj)
....
....
1>TS_BSRP - 9 error(s), 1 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
It is is possible to force the linker to ignore one of the copies of these function using the command
line switch "/FORCE:MULTIPLE". This enable compiling the program but with numerous warnnings as follow
1>------ Rebuild All started: Project: TS_BSRP, Configuration: Debug Win32
1>Deleting intermediate and output files for project 'TS_BSRP', configuration 'Debug|Win32'
1>Compiling...
1>main.cpp
1>Compiling manifest to resources...
1>Microsoft (R) Windows (R) Resource Compiler Version 6.1.6723.1
1>Copyright (C) Microsoft Corporation. All rights reserved.
1>Linking...
1>LINK : warning LNK4075: ignoring '/INCREMENTAL' due to '/FORCE' specification
1>LIBCMT.lib(invarg.obj) : warning LNK4006: __initp_misc_invarg already defined in LIBCMTD.lib(invarg.obj); second definition ignored
1>LIBCMT.lib(invarg.obj) : warning LNK4006: __invoke_watson already defined in LIBCMTD.lib(invarg.obj); second definition ignored
1>LIBCMT.lib(invarg.obj) : warning LNK4006: __set_invalid_parameter_handler already defined in LIBCMTD.lib(invarg.obj); second definition ignored
...
...
1>TS_BSRP - 0 error(s), 22 warning(s)
========== Rebuild All: 1 succeeded, 0 failed, 0 skipped ==========
The program seems to work fine for now but I don't feel like go on programming with these warning that I don't fully understand.
Is there any solution for this issue?
Alternativly, is it safe to ignore these warinings?
I vaguely remember that in previois versions Ilog provided a debug version for each library, is there any way tp obtain one from IBM?
#CPLEXOptimizers#DecisionOptimization