Results 1 to 4 of 4

Thread: Building with 3rd party library

  1. #1
    Join Date
    Aug 2017
    Posts
    3
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Windows

    Default Building with 3rd party library

    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!

    Build error:
    Qt Code:
    1. 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
    2. 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)
    3. surfacesmoother.obj : error LNK2001: unresolved external symbol "public: virtual void __cdecl IwObject::Dump(char *)const " (?Dump@IwObject@@UEBAXPEAD@Z)
    4. release\legereModeler.exe : fatal error LNK1120: 2 unresolved externals
    5. jom: E:\sandbox\build-legereModeler-Desktop_Qt_5_8_0_MSVC2015_64bit-Release\Makefile.Release [release\legereModeler.exe] Error 1120
    6. jom: E:\sandbox\build-legereModeler-Desktop_Qt_5_8_0_MSVC2015_64bit-Release\Makefile [release] Error 2
    7. 14:58:30: The process "C:\Qt\Qt5.8.0\Tools\QtCreator\bin\jom.exe" exited with code 2.
    To copy to clipboard, switch view to plain text mode 

    My *.pro file:
    Qt Code:
    1. QT += core gui
    2.  
    3. greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
    4.  
    5. TARGET = legereModeler
    6. TEMPLATE = app
    7. DEFINES += QT_DEPRECATED_WARNINGS
    8. #DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0
    9.  
    10. SOURCES += main.cpp\
    11. control/surfacesmoother.cpp \
    12. display/mainwindow.cpp \
    13. handlers/mainwindowhandlers.cpp \
    14. model/fakedata.cpp \
    15. utils/coordinatesmanager.cpp
    16.  
    17. HEADERS += control/surfacesmoother.h \
    18. display/mainwindow.h \
    19. handlers/mainwindowhandlers.h \
    20. model/fakedata.h \
    21. utils/coordinatesmanager.h \
    22. GeneratedFiles/ui_mainwindow.h
    23.  
    24. FORMS += mainwindow.ui
    25.  
    26. LIBS += -L$$PWD/../SMS/ -lNLib
    27. #LIBS += -LC:\sandbox\SMS -lNLib
    28. #LIBS += -L$$PWD/../SMS/ -lNLibd
    29.  
    30. LIBS += -L$$PWD/../SMS/ -lNMTLib
    31. #LIBS += -LC:\sandbox\SMS -lNMTLib
    32. #LIBS += -L$$PWD/../SMS/ -lNMTLibd
    33.  
    34. INCLUDEPATH += $$PWD/../SMS
    35. DEPENDPATH += $$PWD/../SMS
    To copy to clipboard, switch view to plain text mode 

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Building with 3rd party library

    Please check the compiler invocation if it sets a proper path to search for your library. Also check if the libraries you link against do contain the missing symbols.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  3. #3
    Join Date
    Aug 2017
    Posts
    3
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Windows

    Default Re: Building with 3rd party library

    Thanks for your reply,
    Where can I find the compiler invocation?
    .... like I wrote: the project works fine in Visual Studio, so my symbols do exist ... I would really prefer to use QT Creator.

  4. #4
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Building with 3rd party library

    Quote Originally Posted by RingAndReed View Post
    Where can I find the compiler invocation?
    In the "compiler output" tab (on the bottom) in Creator.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


Similar Threads

  1. Replies: 0
    Last Post: 10th June 2013, 01:54
  2. Replies: 1
    Last Post: 25th October 2012, 17:13
  3. Replies: 3
    Last Post: 7th June 2012, 14:33
  4. My 3rd party library RPATH problem (Linux)
    By jezze_h in forum Installation and Deployment
    Replies: 3
    Last Post: 8th September 2011, 12:11
  5. Building a third party library
    By munna in forum General Programming
    Replies: 1
    Last Post: 6th October 2006, 20:43

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.