LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Why do I get "Unable to load VISA.dll" when running a CVI project?

Hardrive crash. Reload old software. When attempting to run previously correct CVI LabWindows program - get error. When trying to compile project, get two link errors: Undefined symbols GetMyLA and InitVXILibrary. All seem linked to inability to find Visa.dll. Visa.dll exists in C:\Windows\System as visa.dll version visa32.dll. CVI program is old (1997). Would like to just recreate but mngmnt wants old to work first. Where can I find visa.dll?
0 Kudos
Message 1 of 2
(3,459 Views)
This type of link error is indicating that it cannot find a definition for the two functions you mentioned in any of your project source files (.c, .obj, or .lib) or in any of the link search paths setup for your project (some are setup by default, such as the ...\cvi\bin directory that contains the visa.lib and visa.lfp files). Even though the functions may be defined inside of a dll (such as is the case for InitVXILibrary. I have no idea what GetMyLA is, this sounds like a user defined function) you still need a statically linked definition to be included in your executable that will reroute the function call to the dll, and this is most often accomplished by including an import libary to link against (such as visa.lib).

As for getting an error that stat
es "Unable to load visa.dll", this is actually an error indicating that it cannot load the 16-bit version of the VISA library. The only reason you would get this error is if you are trying to use an import library that explicitly tries to load this dll. You should not be using visa.dll or any 16-bit version of LW/CVI on a Win32 OS (i.e. 9X/ME/NT/2K/XP), which is what it sounds like you are doing since you indicated that you found the visa32.dll (the proper version for Win32 OSs) in the windows\system directory. Generally, you can recreate an executable that was originally developed on a 16-bit platform with the new 32-bit compiler and 32-bit libraries if you just port the source file over and recompile/link it, just make sure that you are using the correct libraries to link against for the VISA library.

Jason F.
Applications Engineer
National Instruments
www.ni.com/ask
Message 2 of 2
(3,459 Views)