Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. connecting CPLEX to Qt
QtWS25 Last Chance

connecting CPLEX to Qt

Scheduled Pinned Locked Moved Unsolved General and Desktop
qt 5.6.0visual c++cplex
10 Posts 3 Posters 4.0k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • N Offline
    N Offline
    nazimGT
    wrote on 27 Jun 2016, 07:37 last edited by
    #1

    hello, i'm new in Qt, i don't know how to use CPLEX libraries in Qt
    so here is my *.pro file

    QT += 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 ?

    1 Reply Last reply
    0
    • J Offline
      J Offline
      jsulm
      Lifetime Qt Champion
      wrote on 27 Jun 2016, 07:45 last edited by
      #2

      It doesn't look like a Qt issue. You should check whether this library supports your compiler.

      https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      1
      • N Offline
        N Offline
        nazimGT
        wrote on 27 Jun 2016, 08:10 last edited by
        #3

        cplex libraries are created to visual c++ (2012 here) and i've set the compiler as Microsoft Visual C++ compiler 11.0 (x86)

        1 Reply Last reply
        0
        • S Offline
          S Offline
          SGaist
          Lifetime Qt Champion
          wrote on 27 Jun 2016, 21:26 last edited by
          #4

          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.

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          N 1 Reply Last reply 28 Jun 2016, 09:06
          1
          • S SGaist
            27 Jun 2016, 21:26

            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.

            N Offline
            N Offline
            nazimGT
            wrote on 28 Jun 2016, 09:06 last edited by
            #5

            @SGaist Hi thank you for answering
            what can i do now ? i've tested it on visual C++ 2013 and i set the platforme at v110 beause of libraries for visual C++ 2012 and it works fine
            but i don't know how to do for Qt

            1 Reply Last reply
            0
            • S Offline
              S Offline
              SGaist
              Lifetime Qt Champion
              wrote on 28 Jun 2016, 11:38 last edited by
              #6

              Do you have that library available for any other version of Visual Studio ?

              Interested in AI ? www.idiap.ch
              Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

              1 Reply Last reply
              1
              • N Offline
                N Offline
                nazimGT
                wrote on 28 Jun 2016, 13:13 last edited by
                #7

                @SGaist yes, for visual studio 2010

                1 Reply Last reply
                0
                • S Offline
                  S Offline
                  SGaist
                  Lifetime Qt Champion
                  wrote on 28 Jun 2016, 16:08 last edited by
                  #8

                  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.

                  Interested in AI ? www.idiap.ch
                  Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                  1 Reply Last reply
                  1
                  • N Offline
                    N Offline
                    nazimGT
                    wrote on 29 Jun 2016, 07:00 last edited by
                    #9

                    i have only libraries for visual studio 2012 and 2010, how can i do it ?

                    1 Reply Last reply
                    0
                    • S Offline
                      S Offline
                      SGaist
                      Lifetime Qt Champion
                      wrote on 29 Jun 2016, 07:21 last edited by
                      #10

                      Here you have the instructions

                      Interested in AI ? www.idiap.ch
                      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                      1 Reply Last reply
                      1

                      2/10

                      27 Jun 2016, 07:45

                      topic:navigator.unread, 8
                      • Login

                      • Login or register to search.
                      2 out of 10
                      • First post
                        2/10
                        Last post
                      0
                      • Categories
                      • Recent
                      • Tags
                      • Popular
                      • Users
                      • Groups
                      • Search
                      • Get Qt Extensions
                      • Unsolved