Error linking external library (Agilent visa32.lib)
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?
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
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?
Did you also use $$quote() like in my example ?
I tried with and without to no avail. What does $$quote() do?
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