Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. 3rd Party Software
  4. Can't build using 3rd party libraries

Can't build using 3rd party libraries

Scheduled Pinned Locked Moved Unsolved 3rd Party Software
6 Posts 2 Posters 2.6k Views 2 Watching
  • 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.
  • R Offline
    R Offline
    RingAndReed
    wrote on last edited by RingAndReed
    #1

    I have a problem accessing a 3rd party library (SMS) in QT Creator.
    I'm on Windows 10, 64 bit
    Qt Creator 4.2.1 - Based on Qt 5.8.0 (MSVC 2015, 32 bit)
    Using Visual Studio 2015 (Community and Enterprise) with update 3

    In Visual Studio, I was able to correct the problem using Windows Environment Variables and by setting Character Set to Unicode. But I would really prefer to use Qt Creator for an IDE.

    In Qt Creator, the simplest code referring to SMS produces the build error below. There are no *d.dll or *d.lib files (no debugging versions) but that does not seem to prevent debugging my own code in Visual Studio. I have tried release-mode building in Qt Creator, but that did not help. I have even tried modifying the *.pro file with an absolute path - no go.

    Can anyone tell me how to buildling with these 3rd party libraries?
    Thanks!

    The build error:

    	link /NOLOGO /DYNAMICBASE /NXCOMPAT /INCREMENTAL:NO /SUBSYSTEM:WINDOWS "/MANIFESTDEPENDENCY:type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' publicKeyToken='6595b64144ccf1df' language='*' processorArchitecture='*'" /MANIFEST:embed /OUT:release\legereModeler.exe @C:\Users\ROBIN_~1\AppData\Local\Temp\legereModeler.exe.4552.1922.jom
    surfacesmoother.obj : error LNK2019: unresolved external symbol "void __cdecl iwos_WriteBuffer(char const *,char const *,char const *)" (?iwos_WriteBuffer@@YAXPEBD00@Z) referenced in function "public: virtual void __cdecl IwTArray<class IwVector3d>::Dump(void)const " (?Dump@?$IwTArray@VIwVector3d@@@@UEBAXXZ)
    surfacesmoother.obj : error LNK2001: unresolved external symbol "public: virtual void __cdecl IwObject::Dump(char *)const " (?Dump@IwObject@@UEBAXPEAD@Z)
    release\legereModeler.exe : fatal error LNK1120: 2 unresolved externals
    jom: E:\sandbox\build-legereModeler-Desktop_Qt_5_8_0_MSVC2015_64bit-Release\Makefile.Release [release\legereModeler.exe] Error 1120
    jom: E:\sandbox\build-legereModeler-Desktop_Qt_5_8_0_MSVC2015_64bit-Release\Makefile [release] Error 2
    14:58:30: The process "C:\Qt\Qt5.8.0\Tools\QtCreator\bin\jom.exe" exited with code 2.
    

    My *.pro file:

    QT       += core gui
    
    greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
    
    TARGET = legereModeler
    TEMPLATE = app
    DEFINES += QT_DEPRECATED_WARNINGS
    
    
    
    SOURCES += main.cpp\
        control/surfacesmoother.cpp \
        display/mainwindow.cpp \
        handlers/mainwindowhandlers.cpp \
        model/fakedata.cpp \
        utils/coordinatesmanager.cpp
    
    HEADERS += control/surfacesmoother.h \
        display/mainwindow.h \
        handlers/mainwindowhandlers.h \
        model/fakedata.h \
        utils/coordinatesmanager.h \
        GeneratedFiles/ui_mainwindow.h
    
    FORMS    += mainwindow.ui
    
    LIBS += -L$$PWD/../SMS/ -lNLib
    #LIBS += -LC:\sandbox\SMS -lNLib
    #LIBS += -L$$PWD/../SMS/ -lNLibd
    
    LIBS += -L$$PWD/../SMS/ -lNMTLib
    #LIBS += -LC:\sandbox\SMS -lNMTLib
    #LIBS += -L$$PWD/../SMS/ -lNMTLibd
    
    INCLUDEPATH += $$PWD/../SMS
    DEPENDPATH += $$PWD/../SMS
    
    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      Do you mean you are building your Qt project with Visual Studio successfully and only modify the source charset option ?

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

      R 1 Reply Last reply
      0
      • SGaistS SGaist

        Hi,

        Do you mean you are building your Qt project with Visual Studio successfully and only modify the source charset option ?

        R Offline
        R Offline
        RingAndReed
        wrote on last edited by
        #3

        @SGaist Yes, that's right.

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          Then you should be able to do that through QMAKE_CXXFLAGS

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

          R 1 Reply Last reply
          0
          • SGaistS SGaist

            Then you should be able to do that through QMAKE_CXXFLAGS

            R Offline
            R Offline
            RingAndReed
            wrote on last edited by
            #5

            @SGaist said in Can't build using 3rd party libraries:

            QMAKE_CXXFLAGS

            Eeeeg, looks really cool (just looked it up) .... but I'm a Qt newbie ..... I was hoping that importing the *.lib and *.dll files should "just make it work". (As it does in MSVS.)

            So I found this: http://doc.qt.io/qt-5/qmake-variable-reference.html#qmake-cxxflags but I haven't clue 1 where to start learning to use them..... could you point me in the right direction?

            Thanks!

            1 Reply Last reply
            0
            • SGaistS Offline
              SGaistS Offline
              SGaist
              Lifetime Qt Champion
              wrote on last edited by
              #6

              Add it to your .pro file and then grab from Visual Studio the switch used to select the character.

              QMAKE_CXXFLAGS += whatever_you_found
              

              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
              0

              • Login

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