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. How to link external library to Qt project

How to link external library to Qt project

Scheduled Pinned Locked Moved Unsolved General and Desktop
4 Posts 2 Posters 569 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.
  • H Offline
    H Offline
    Hareesh
    wrote on last edited by
    #1

    Hi All,

    I wanted to link external static library to Qt project. Library was developed in c++ and the IDE used was Eclipse. I had added the library to Qt project by using "Add library" option and added the dependent header file to project.
    On building the project, i am getting below error
    "Undefined reference to method function"
    Here function is defined in library.

    Kit used for building project in QT was MINGW 32 bit.

    Can you please help me in resolving the issue.
    Thanking you in advance.

    jsulmJ 1 Reply Last reply
    0
    • H Hareesh

      Hi All,

      I wanted to link external static library to Qt project. Library was developed in c++ and the IDE used was Eclipse. I had added the library to Qt project by using "Add library" option and added the dependent header file to project.
      On building the project, i am getting below error
      "Undefined reference to method function"
      Here function is defined in library.

      Kit used for building project in QT was MINGW 32 bit.

      Can you please help me in resolving the issue.
      Thanking you in advance.

      jsulmJ Offline
      jsulmJ Offline
      jsulm
      Lifetime Qt Champion
      wrote on last edited by
      #2

      @Hareesh What compiler was used to build the library?

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

      1 Reply Last reply
      0
      • H Offline
        H Offline
        Hareesh
        wrote on last edited by
        #3

        Hi,
        gcc compiler was used to build the library.

        Even i had tried to link the library which was built using Visual studio 2017 to Qt project. Here also i am getting "undefined reference error to method1" where method1 was defined in the library.

        Please help me out.

        jsulmJ 1 Reply Last reply
        1
        • H Hareesh

          Hi,
          gcc compiler was used to build the library.

          Even i had tried to link the library which was built using Visual studio 2017 to Qt project. Here also i am getting "undefined reference error to method1" where method1 was defined in the library.

          Please help me out.

          jsulmJ Offline
          jsulmJ Offline
          jsulm
          Lifetime Qt Champion
          wrote on last edited by
          #4

          @Hareesh Can you show your pro file and the whole build log?

          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