LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Losing track of DLL files

I'm having problems with LV 7.1.1 losing track of the locations of DLL files when I move code back & forth between a development machine and a target machine. The DLL files are located in (what I think to be) the same location on both machines yet whenever I move the code from one machine to the other (direction does not matter) I have to (re)tell LV where to find the DLL files and that always triggers a warning like this:

Virtual Instrument
- The external library expected to be at
"Program Files:\SI Image SGL C\tiff2vi.dll" was loaded from
"C:\Program Files\SI Image SGL C\tiff2vi.dll".

- The external library expected to be at
"Program Files:\SI Image SGL C\SpecInst.dll" was loaded from
"C:\Program Files\SI Image SGL C\SpecInst.dll".

:

When I am called on to identify the path to the DLLs I do it by browsing from C: --> Program Files --> SI Image SGL C, yet somewhere along the way LV turns C:\Program Files into Program Files: and remembers it as such.

Any idea what might be causing this and what I might do to prevent it or fix it?

0 Kudos
Message 1 of 7
(3,694 Views)

hi there,

never seen this, so these suggestions are just shots in the blue:

- is the LV 7.1.1 RTE installed on both systems? if not install LV 7.1.1 RTE
- check the value of the "ProgramFiles" environment variable (type "set" on a system prompt).
- add the path to the dll to the "path" environment variable
- try to place the dlls in the same folder as the application
- consider to place the dll in the systems folder

good luck and let us know

 

 

Best regards
chris

CL(A)Dly bending G-Force with LabVIEW

famous last words: "oh my god, it is full of stars!"
0 Kudos
Message 2 of 7
(3,683 Views)
Would like to add to Chris's suggestions
 
Is the same version of windows running on both the systems? not sure if this is significant, but u can do a check nevertheless.
 
regards
 
Dev
 
 
 
0 Kudos
Message 3 of 7
(3,679 Views)
Hi,
 
Are you sure that on the developement machine the dll is where you say it is, it might be that they are multiple copies of the dll and the VI maybe pulling in the dll from an alternative location. Has the VI, on the developement system, got a * when you load it, indicating something has changed.
 
Do a search on your system an see if you have multiple copies of the dll.
 
Regards
Ray Farmer
Regards
Ray Farmer
0 Kudos
Message 4 of 7
(3,676 Views)
Thanks for the replies everyone. Here's what I know so far...
 
"is the LV 7.1.1 RTE installed on both systems?"
Both systems have fully licensed development systems of LV installed. The target system is not in an environment that is conducive to much development activity but work is done there and brought back to the real development machine (hence the reason why I said this happened regardless of the direction of transfer of the VIs - they can get updated on each end and then moved to the other system).
"check the value of the "ProgramFiles" environment variable"
I don't see anything out of place here. The "Path" variable is OK (makes sense) on both machines and the "ProgramFiles" variable is identical on both machines.

"add the path to the dll to the "path" environment variable"

I'll consider this as a last resort. I'd rather not be changing system variables (unless it were to correct errors) to get something that should be simple fixed.

"try to place the dlls in the same folder as the application"   &   "consider to place the dll in the systems folder"

They are already in the folder with the application that they were delivered with; the fact that I'm also using them with the LabVIEW code is an add-on. I won't be moving them because I don't want to disturb the other application.

"Is the same version of windows running on both the systems?"

Yes, identical.

"Are you sure that on the development machine the dll is where you say it is, it might be that they are multiple copies of the dll and the VI maybe pulling in the dll from an alternative location."

There is only one copy of the DLLs on each machine. The message I'm getting about the where LV is looking for but not finding the files even confirms that. It's the exact same &*^%$#@ directory (or folder if you prefer) but in one case the path includes a logical variable replacement for "C:\Program Files" and in the other case it is explicitly spelled out.

"Has the VI, on the development system, got a * when you load it, indicating something has changed."

 Yes the VI has changed, it's a natural result of it not having found the DLL where it thought it should be and my having to point it out again.
But that is the only reason it has changed. It's not from having being edited.
 
I should go on to say that all the VIs that make up the system reside in a folder hierarchy and they move back & forth between the two computers as a zipped (& numbered) archive of the top-level folder. If I change the LV system on one end or the other, I zip the whole mess up and move the zipped file to the other machine, trash the old LV system folder and unzip the revised folder hierarchy to a new set of folders.  
0 Kudos
Message 5 of 7
(3,661 Views)
Hello Warren,

I am able to reproduce the behavior if I store a DLL in Program Files and then move the location of my calling VI.  It is the case that if something has changed on your system (say a call library node can no longer find a DLL) LabVIEW attempts to search for a missing VI and replace the old instance with an instance of the moved DLL.  Unfortunately, it's replacing C:\Program Files with Program Files:\  As mentioned by Chris and in the following KnowledgeBase: Why Does My VI Prompt for My DLL Every Time I Open It, you won't be able to eliminate the search dialog if you save your DLL in Program Files, but you can include your DLL directory in the VI Search Path, so that is is easier for LabVIEW to locate your VI.

Sorry for the inconvenience and I have reported this issue to the LabVIEW team for further review.  Thanks for the feedback!
Wendy L
LabWindows/CVI Developer Newsletter
Message 6 of 7
(3,636 Views)

Wendy,

Thanks for taking the time to look into this for me and confirming that it is indeed aberrant behavior by LabVIEW.
And thanks also for the the link to the possible workarounds.
I'll give them a try when I return to work after the holiday. Have a good one!

Message 7 of 7
(3,630 Views)