12-04-2017 07:10 PM
Hello,
I am trying to update some old code and need to make it into an executable. There are a couple dlls that are called in the code and I can run just fine in development and even the executable runs fine on my development machine. The build finishes with a data directory that contains the dlls. When I run a VM with just the run time engine of LabVIEW however the program has a broken run arrow and says it cannot load one of the dlls. Any suggestions as to what is going on?
LV 2016 32 Bit
12-04-2017 09:38 PM
Hi Steven,
Try moving the dlls out of the subdirectory into the directory with the exe. If that doesn't work, try modifying the build so the Resource directory is the same as the exe directory.
12-05-2017 12:52 AM
I tried moving the dll into the same directory as the exe with no success. I can try changing the build to put it in the same directory tomorrow. I am home now and the exe works on my home laptop so I am wondering if the run time install is messed up. My VM needed to restart and hung until I had to use task manager to restart after installing the run time engine. Probably try reinstalling that as well.
12-05-2017 09:15 AM
Read this article for help in specifying the path to a library file.
12-05-2017 12:03 PM - edited 12-05-2017 12:04 PM
It specified by path which seems correct to me as it's a specific dll for the North Atlantic. I wonder if someone could try the attached exe (with data directory and dll) and tell me if it is at least not a broken VI. Trying to narrow down if it's a problem with my VM or a problem with the build. I can run from my dev machine, but from my VM the exe is a broken VI with an error message that the dll doesn't have a function called. Thanks
(Needs LV 2016 32 bit Run Time or development)
12-05-2017 01:01 PM
I'm not sure what happens during loading if a DLL is "statically linked" to another/missing DLL. You might want to look for DLLs that "NAI2250.dll" needs - and be sure they are on the target station/VM.
12-05-2017 04:06 PM
Just after I double-clicked your NAI Initialize.exe, I thought "Wait a minute -- am I running someone else's code on my Valuable PC? How stupid is that?", but then I shrugged and said "This is a lot of effort to target a subset of LabVIEW users ...", and then this popped up:
I'll let you decide if it's a success or not.
My system: Windows 7 x64 (latest updates installed), LabVIEW 2016 (but nothing "higher"), with LabVIEW RT, LabVIEW Vision, and standard Device Drivers.
Bob Schor
12-05-2017 04:36 PM
I'm pretty sure it's a "dependency" problem of the NAI2250.dll. I'm guessing Bob ran this on a development station that has VISA and NI-488.2 installed (but they are not installed on the VM). I'd create an installer and modify "Additional Installers" to include NI-488.2 Runtime (the GPIB stuff) as well as VISA Runtime and VISA Configuration & Support (for trouble-shooting).
12-05-2017 06:24 PM
Heh, thanks Bob. I was hoping someone would be brave enough to run that. It was just an initialization VI that was in the NAI lib I made into an exe. (I can't speak about what is in the dll, but I trust the source) And yes, that was further than I can get with just the run time and drivers on my VM.
550nm the NI 488.2 Run time and VISA Runtime installers were already in the installer, I added the VISA Configuration and tried again but I am still having the same issue. However I have tried this on another machine that has LV Dev on it and it works so I think you are right in that it is some dependency that is getting missed. There are a lot of dynamically loaded VI's that I worry about. I manually add all the dynamically loaded VI's into the build so I hoped that all the dependencies would get caught there, but maybe there is something that I am missing.
12-05-2017 07:52 PM - edited 12-05-2017 07:53 PM
@550nm wrote:
I'm guessing Bob ran this on a development station that has VISA and NI-488.2 installed (but they are not installed on the VM).
Close, but no cigar. I do have VISA, DAQmx, Serial, Vision, Real-Time, PXI, but no NI-488.2. At least, according to MAX ...
Bob Schor