LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

DLL path : strange behavior of the Call Library Function Node

Hi all,
 
Summary :
 
In the Call Library Function Node, seems that you should not directly edit the DLL name in the "Library Name or Path" field, but always use the "Browse..." button !  Otherwise if you build an application, the EXE will look for BOTH DLLs, the old name PLUS the new one (tested on LabVIEW 7.1) !
 
Long story :
 
Finally got rid of my troubles with dll path and names in a built application, and would like to know if I'm the only one to get this problem :
 
I am writing some mathematical code in C, building a DLL with the resulting functions.
 
I use LabVIEW 7.1 to call these functions, with a whole testing environment. Of course I use for this the Call Library Function Node.
 
I sometimes have to update my C code to add improvement, but want to keep the previous versions for comparisons. So I decided to introduce a version number in the DLL name, like "Version_1.dll", "Version_2".dll", and so on. The drawback is that I have then to edit my VI to change the DLL name in each instance of the Call Library Function Node. OK, not very funny but I can live with that (I know NI has already received the request to introduce a way to dynamically change the DLL name / path, and I would REALLY be glad when it's possible)...
 
So, in details, I make a copy of my "Test_Version_1.vi" (with calls to "Version_1.dll") into "Test_Version_2.vi" (intended to call "Version_2.dll"), open the latter VI, edit all the Call Library Function Node settings by editing the DLL name in the "Library Name or Path" field (just replace 1 with a 2 in DLL name). Run it... it works. Compile it into an Application... it works (on my PC).
 
All is fine this way....... unless I start to build an installer for easy distribution to my colleagues : the "Test_Version_2.exe" starts to ask for the "Version_1.dll"....
 
I opened the Test_Version_2.vi with an ASCII text editor to check that "Version_1.dll" is indeed still mentionned in it, although there is absolutely no reference to it in the diagram anymore... Tried Save as, Clear History, anything... No way...
 
And I finally found out that the only way to have "Version_1.dll" to disappear completely from the Test_Version_2.vi file is to just click the "Browse..." button in the Settings window of the Call Library Function Node, re-select the Version_2.dll (which is already indicated in the "Library Name or Path" field) and save the VI...
 
A bug ? Something I misunderstood ?
 
Regards,
 
Vincent
0 Kudos
Message 1 of 1
(2,545 Views)