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. [Solved] Unable to reference external library
Forum Updated to NodeBB v4.3 + New Features

[Solved] Unable to reference external library

Scheduled Pinned Locked Moved General and Desktop
7 Posts 3 Posters 1.5k 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
    reezeus
    wrote on last edited by reezeus
    #1

    Hello

    I have an issue when I try to build my Qt app (within Qt creator, MVSC2013 compiler). I need to include the Bloomberg C++ API and I think this is what is the caused of my issue.
    I have used the Qt tool to add the external library, and the following script has been generated in the .pro file:

    win32:CONFIG(release, debug|release): LIBS += -L$$PWD/API/APIv3/C++API/v3.8.18.1/lib/ -lblpapi3_64
    else:win32:CONFIG(debug, debug|release): LIBS += -L$$PWD/API/APIv3/C++API/v3.8.18.1/lib/ -lblpapi3_64d
    else:unix: LIBS += -L$$PWD/API/APIv3/C++API/v3.8.18.1/lib/ -lblpapi3_64

    INCLUDEPATH += $$PWD/API/APIv3/C++API/v3.8.18.1/include
    DEPENDPATH += $$PWD/API/APIv3/C++API/v3.8.18.1/include

    But I have the following message in the "Issues tab" when I try to build the project (after running qmake):
    LNK1104: cannot open file 'blpapi3_64d.lib'

    Can you help me please?

    1 Reply Last reply
    0
    • S Offline
      S Offline
      slesa
      wrote on last edited by
      #2

      I am using
      LIBS = -L$${PWD}/../../bin/lib/
      -llaunchy.qxt

      and it worked. Maybe missing braces?

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

        Hi,

        Is your project located in a path with spaces ?

        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
        • R Offline
          R Offline
          reezeus
          wrote on last edited by
          #4

          Hi slesa, SGaist

          I have tried to add the LIBS manually before using LIBS += "libpath" but it didn't work so I decided to use the tool to be sure it is not a syntax error.
          The project is not located in a path with spaces, so there's no need for braces.

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

            Might be a silly question but, are you sure you have both debug and release libraries for blpapi3_64 ?

            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
            • R Offline
              R Offline
              reezeus
              wrote on last edited by
              #6

              Hi SGaist

              Actually it is not that silly... ;)
              I had only the release version, I deleted the link to the debug library (which was automatically added by the Qt tool, because I had ticked "Add 'd' for debug version") and now it works perfectly.
              Thanks for your help :) Cheers

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

                You're welcome !

                Since you have it working now, please update the thread title prepending [solved] so other forum users may know a solution has been 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