LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Resource not found when running executable

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

 

 

Resource Error.PNG

 

 

data directory.PNG

0 Kudos
Message 1 of 16
(4,098 Views)

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.

0 Kudos
Message 2 of 16
(4,067 Views)

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.

0 Kudos
Message 3 of 16
(4,048 Views)

Read this article for help in specifying the path to a library file.

aputman
------------------
Heads up! NI has moved LabVIEW to a mandatory SaaS subscription policy, along with a big price increase. Make your voice heard.
0 Kudos
Message 4 of 16
(4,026 Views)

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)

 

 

0 Kudos
Message 5 of 16
(4,008 Views)

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.

0 Kudos
Message 6 of 16
(3,992 Views)

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:

NAI Initialize FP.png

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

0 Kudos
Message 7 of 16
(3,970 Views)

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).

0 Kudos
Message 8 of 16
(3,964 Views)

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. 

 

0 Kudos
Message 9 of 16
(3,956 Views)

@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

0 Kudos
Message 10 of 16
(3,949 Views)