mark fredette
mark fredette

Reputation: 1

cannot get MS Visual Studio VISA application to link

I am writing a test program. I am trying to do simple visa calls to instruments on USB. I cannot get the program to link - unresolved externals. At this point, my program is very simple, only a couple visa calls. I have read some content about similar problems and have tried what was suggested with out any luck.

I am using MS VisualStudio 19. I have entered the visa.h folder as C/C++ Additional Include Directory. The linker can't find any of the contained functions, such as ViOpen(). NI IVI is installed on my PC and I have added the lib folder to the VS Linker Additional Library Directories. I have also entered all the .lib files in that folder to the Linker\Input\Additional Dependencies field. But when I compile and link, I get Unresolved External Symbol errors for all the visa functions.

Folder on my PC with the lib files (there are 4 files) is... C:\Program Files\IVI Foundation\VISA\Win64\Lib_x64\msc.

Folder on my PC with visa.h is... C:\Program Files\IVI Foundation\VISA\Win64\Include.

Any ideas will be much appreciated.

Upvotes: 0

Views: 354

Answers (1)

mark fredette
mark fredette

Reputation: 1

I found the solution.

In Project Properties, changing Active Solution Platform from x86 to x64 did the trick. Now project links. Still had to add visa32.lib.

Upvotes: 0

Related Questions