LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Executable does not find .dll file

Problem Description :
I have a VI that is calling a Construction Node, which is referencing a .dll.
I set the search path under tools -> options -> path dialog box to search
for the dll's.
The VI executes properly and device communication is established.
However, I created an executable file and an installer file for the VI and
when I Install and run on another machine the VI can no longer find the dll.

I wonder if this could be a compatability issue between versions, but I was under the impression that 

if I went about packaging an EXE with an installer, then it should run the same on every computer.

Thanks,

 

0 Kudos
Message 1 of 10
(5,348 Views)

Hi Zabala,

 

Thanks for your post and I hope your well today.

 

Firstly when making your EXE build are you selecting to 'Always' include the dll in the Source File Settings in Application Builder?

 

Why Am I Prompted for the Location of lvalarms.dll when Running an Executable?

http://digital.ni.com/public.nsf/allkb/6FF5D9EF51A3B8288625714F00783562?OpenDocument

* has some guidance for including dlls in EXE builds. 

 

Out of interested, is this a 3rd party dll? Or was it an NI dll... did you get any error codes/messages?

 

Secondly, have you specifically provided a path for the dll - this could well be different on the deployment machine. Built executables only look in certain directories for a given function library. For any built executable, be sure to have your DLL installed in one of the following:

  • The same directory as the executable
  • <windows>\system (\winnt\system32 for NT systems)
  • Any path that is specified with the set path command in the autoexec.bat file or listed in the path environment variable on NT

Thus, you can install a DLL in any directory that you wish, but be sure that the respective directory is, at the least, listed in autoexec.bat as described above.

Hope this helps,

 

Kind Regards
James Hillman
Applications Engineer 2008 to 2009 National Instruments UK & Ireland
Loughborough University UK - 2006 to 2011
Remember Kudos those who help! 😉
Message 2 of 10
(5,340 Views)
The search path applies to VIs, not DLLs. For DLLs LabVIEW depends on Windows to find the DLL. See here.
0 Kudos
Message 3 of 10
(5,339 Views)

Here is the error message for the error that I was having. I have not been able to get back to the actual machine yet, but I will try out soon as I am able.

 

Error 8000 at Contructor Node in GetNetRef Z.vi -> .....

This error code is undefined. No one has provided a description for this code or you might have wired a number that is not an error code to the error code input.

 

Again, the VI works on the original computer, but when I try it elsewhere it craps out.

I will let you know how everything goes as soon as I can.

Thank you.

 

0 Kudos
Message 4 of 10
(5,329 Views)
OK, hold on. You're talking about a .NET assembly, not a DLL. That's different. Even though a .NET assembly has a .dll extension, it's not a DLL. The .NET Runtime uses a different mechanism for finding .NET assemblies. See How the Runtime Locates Aseemblies. Is your .NET assembly a private assembly? Is it installed in the GAC? Is it dependent on another  private .NET assembly?
Message 5 of 10
(5,307 Views)

Sorry for the delay, but the life of an intern is sometimes unfair!
 - Is your .NET assembly a private assembly :

Excuse my ignorance, but what does private assembly mean? I wrote it myself if
that helps.

 - Is it installed in the GAC? : No unfortunately I
do not have access to the GAC under my current user status on the computers
which will be running the software.

- Is it dependent on another private .NET
assembly? 
: No, this is actually the primary .net file on which
other files are dependent.

It defiantly has to be a referencing
error because when I package an
exe. and run in it on the same computer, it runs just fine. However if
I pass
it on to another computer it craps out and gives me the error above.The
idea is to be able to run this file, which is being used to test a
piece
of hardware on several different computers at the same time, all the
while
connecting to a main controller which will monitor all the computers in
the
system.
  

0 Kudos
Message 6 of 10
(5,254 Views)
I'm assuming both computers have the same version of .NET. Which version of LabVIEW is this, and which version of .NET? Can you upload the VI and the .NET assembly?
0 Kudos
Message 7 of 10
(5,246 Views)

Yeah, actually both have the same version of .NET 3.5.

At first I thought that the problem was that I had written the LabView code in 8.6 and was installing in a computer with 8.5, but with the executable/installer, that shouldn't really matter.

As for uploading the LabView vi,  I would not be allowed to do that here, however the .NET I think I can get my hands on by the end of today.

Thanks for your help  smercurio_fp !

0 Kudos
Message 8 of 10
(5,244 Views)

Mr. Zabala wrote:

Yeah, actually both have the same version of .NET 3.5.


.NET 3.5 is not officially supported in LabVIEW. It may work, it may not.


At first I thought that the problem was that I had written the LabView code in 8.6 and was installing in a computer with 8.5, but with the executable/installer, that shouldn't really matter.

I'm assuming the target machine is getting (or has) the 8.6 Runtime.

 

Message 9 of 10
(5,237 Views)

Does the .Net assembly rely on or make calls to any other files, especially a config file?

 

-AK2DM

~~~~~~~~~~~~~~~~~~~~~~~~~~
"It’s the questions that drive us.”
~~~~~~~~~~~~~~~~~~~~~~~~~~
0 Kudos
Message 10 of 10
(5,232 Views)