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
Forum Updated to NodeBB v4.3 + New Features

undefined reference to library function in Qtcreator

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
2 Posts 2 Posters 769 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 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 ??

    jsulmJ 1 Reply Last reply
    0
    • N Narahara

      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 ??

      jsulmJ Offline
      jsulmJ Offline
      jsulm
      Lifetime Qt Champion
      wrote on 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

      • Login

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