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.
  • nazimGTN Offline
    nazimGTN Offline
    nazimGT
    wrote on 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
    • jsulmJ Offline
      jsulmJ Offline
      jsulm
      Lifetime Qt Champion
      wrote on 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
      • nazimGTN Offline
        nazimGTN Offline
        nazimGT
        wrote on 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
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on 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

          nazimGTN 1 Reply Last reply
          1
          • SGaistS SGaist

            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.

            nazimGTN Offline
            nazimGTN Offline
            nazimGT
            wrote on 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
            • SGaistS Offline
              SGaistS Offline
              SGaist
              Lifetime Qt Champion
              wrote on 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
              • nazimGTN Offline
                nazimGTN Offline
                nazimGT
                wrote on last edited by
                #7

                @SGaist yes, for visual studio 2010

                1 Reply Last reply
                0
                • SGaistS Offline
                  SGaistS Offline
                  SGaist
                  Lifetime Qt Champion
                  wrote on 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
                  • nazimGTN Offline
                    nazimGTN Offline
                    nazimGT
                    wrote on last edited by
                    #9

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

                    1 Reply Last reply
                    0
                    • SGaistS Offline
                      SGaistS Offline
                      SGaist
                      Lifetime Qt Champion
                      wrote on 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

                      • Login

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