Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. undefined reference to library function in Qtcreator

undefined reference to library function in Qtcreator

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
2 Posts 2 Posters 762 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
    Narahara
    wrote on 21 Jan 2022, 10:46 last edited by
    #1

    I develop a Qt project of Qt creator 4.4.12 in windows10. And I use a library developed by Visual Studio 2013.
    When I build my project, I have an error like "undefined reference to library function".
    But I don't know how to solve this problem.
    I definitely set a include path and a library path in my .pro file.

    .profile

    LIBS += ../LIB/XXX_LIB.lib
    INCLUDEPATH += $$PWD/LIB
    

    The library is a static link library. When I built my project using Qt 5.15.2 MinGW 64-bit and Qt 5.15.2 MSVC 64-bit,
    I had errors. Do you have any solutions ??

    J 1 Reply Last reply 21 Jan 2022, 10:48
    0
    • N Narahara
      21 Jan 2022, 10:46

      I develop a Qt project of Qt creator 4.4.12 in windows10. And I use a library developed by Visual Studio 2013.
      When I build my project, I have an error like "undefined reference to library function".
      But I don't know how to solve this problem.
      I definitely set a include path and a library path in my .pro file.

      .profile

      LIBS += ../LIB/XXX_LIB.lib
      INCLUDEPATH += $$PWD/LIB
      

      The library is a static link library. When I built my project using Qt 5.15.2 MinGW 64-bit and Qt 5.15.2 MSVC 64-bit,
      I had errors. Do you have any solutions ??

      J Online
      J Online
      jsulm
      Lifetime Qt Champion
      wrote on 21 Jan 2022, 10:48 last edited by
      #2

      @Narahara said in undefined reference to library function in Qtcreator:

      And I use a library developed by Visual Studio 201

      Is this library a C++ library?
      If so then you have to use compiler from Visual Studio 2013 to build your app, because you can't mix binaries compiled with different compilers.

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

      1 Reply Last reply
      0

      2/2

      21 Jan 2022, 10:48

      • Login

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