connecting CPLEX to Qt
-
hello, i'm new in Qt, i don't know how to use CPLEX libraries in Qt
so here is my *.pro fileQT += core QT -= gui CONFIG += c++11 TARGET = Console1 CONFIG += console CONFIG -= app_bundle TEMPLATE = app SOURCES += main.cpp QMAKE_CFLAGS_RELEASE = -O2 -MD -MP -C -Wall -fPIC INCLUDEPATH += C:/IBM/ILOG/CPLEX_Studio_Preview126/cplex/include INCLUDEPATH += C:/IBM/ILOG/CPLEX_Studio_Preview126/concert/include INCLUDEPATH += C:/Program Files (x86)/Microsoft Visual Studio 11.0/VC/include DEFINES += IL_STD, ILO_MSVC, ILO_RS6000, _USING_V110_SDK71_ #// cplex123.lib library LIBS += C:/IBM/ILOG/CPLEX_Studio_Preview126/cplex/lib/x86_windows_vs2012/stat_mda/cplex1260.lib #// ilocplex library LIBS += C:/IBM/ILOG/CPLEX_Studio_Preview126/cplex/lib/x86_windows_vs2012/stat_mda/ilocplex.lib #// concert.lib library LIBS += C:/IBM/ILOG/CPLEX_Studio_Preview126/concert/lib/x86_windows_vs2012/stat_mda/concert.lib
i'm using MSVC 2013 kit, compiling with visual c++ 11.0 but actually this doesn't work, i've got those errors :
C:\IBM\ILOG\CPLEX_Studio_Preview126\cplex\include\ilcplex\cpxconst.h:288: error: expected ')' before 'deprecated' # define CPXDEPRECATEDAPI(version) __declspec(dllimport deprecated) ^
someone can help me ?
-
It doesn't look like a Qt issue. You should check whether this library supports your compiler.
-
Hi and welcome to devnet,
You can't mix libraries built with different versions of Visual Studio. Their compiler are not compatible one with the other. All libraries and applications must be build with the same version of Visual Studio.
-
Do you have that library available for any other version of Visual Studio ?
-
Nothing more modern ?
In any case, you can build Qt yourself from sources using the latest version of Visual Studio you can to accommodate that library.
-
Here you have the instructions