Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. Error linking external library (Agilent visa32.lib)
Forum Updated to NodeBB v4.3 + New Features

Error linking external library (Agilent visa32.lib)

Scheduled Pinned Locked Moved Installation and Deployment
6 Posts 2 Posters 5.1k Views 1 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.
  • D Offline
    D Offline
    dfcsingh
    wrote on last edited by
    #1

    Hi all,
    I'm attempting to build a project and getting this error
    :-1: error: LNK1104: cannot open file 'visa32.lib'

    The following is part of my .pro file (auto generated by the 'Add Library' function in QtCreator
    unix|win32: LIBS += -L$$PWD/../../../../../../Program Files/IVI Foundation/VISA/WinNT/lib/msc/ -lvisa32
    INCLUDEPATH += $$PWD/../../../../../../Program Files/IVI Foundation/VISA/WinNT/lib/msc
    DEPENDPATH += $$PWD/../../../../../../Program Files/IVI Foundation/VISA/WinNT/lib/msc

    The library is present at the path C:\Program Files\IVI Foundation\VISA\WinNT\lib\msc

    Any ideas as to why I'm still getting a linker error?

    Thanks.
    David

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

      Hi and welcome to devnet,

      You're probably experiencing the path with space problem. You should rather use something like

      @LIBS += -L$$quote("C:/Program Files/IVI Foundation/VISA/WinNT/lib/msc")@

      Hope it helps

      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
      • D Offline
        D Offline
        dfcsingh
        wrote on last edited by
        #3

        Hi,

        Thanks for the help, I definitely think its a white space issue but after placing all references to Program Files in quotes I'm getting

        @LNK1181: cannot open input file 'C:/Program.obj'@

        Which as far as the internet can tell me is happening because it's cutting of my path names after Program (and before Files) and appending the default suffix .obj. Is there any other method of getting around white space or am I still missing something?

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

          Did you also use $$quote() like in my example ?

          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
          • D Offline
            D Offline
            dfcsingh
            wrote on last edited by
            #5

            I tried with and without to no avail. What does $$quote() do?

            -Thanks!

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

              It should properly quote path containing spaces so you don't have to worry about them (which version of Qt are you using by the way ?)

              If it doesn't work (happened to me also), you can always use the 8.5 version of the path elements that contain 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

              • Login

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