LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Call library node in builded exe - path problem

Hi!
I have builded an EXE with the App. Builder. In my application I use the Call Library Node, and call functions from a DLL.
I give the path of the dll with the "Current VI path", than strip the path, and add the DLL-s name. So in the CallLibNode I check the "specify path on diagram" option.
It works when I run my application on a PC that has the LV 8.5 installed.
But when I install my app on a PC that does not have it, just my setup installs the Runtime Engine onto it, it does not work, and I get errors.

Which is the proper way to give the DLL-s path, if I want my app run on any PC that does not have LV installed?

Thanks:
Waszil
0 Kudos
Message 1 of 11
(3,785 Views)
Does the executable run correctly on the development machine? If not I would imagine it is a problem with how you are referencing the dll.

Have you installed all necessary support libraries you may be using throughout the program on the target machine? Are you able to confirm that the error messages are referencing to the dll not being found?

It sounds like you are referencing the dll correctly. When compiled, the dll is put into the 'data' directory within the root directory, so make sure that is there on the target pc


Message Edited by yenknip on 08-04-2008 10:42 AM
_____________________________
- Cheers, Ed
0 Kudos
Message 2 of 11
(3,781 Views)
Yes, it runs correctly on the dev. machine. Moreover, it runs on any machine that has LabVIEW installed.
The problem only appears on a PC that is LV-virgin.
Yes, the error is about the referenced DLL.
Any idea?
0 Kudos
Message 3 of 11
(3,773 Views)
No, there is no data directory. It just puts the dll next to the app.exe, as the Generate Preview functon shows in the AppBuilder. But it should be OK, and I say, it works on my machine.
I wonder, if there's sg other lib or module aside from the LV runtime Engine, that should be added...

0 Kudos
Message 4 of 11
(3,769 Views)

Hi Waszil,

did you create the dll with LabVIEW? Which error message do you get? Are there some more dll calls in your dll?

Mike

0 Kudos
Message 5 of 11
(3,767 Views)
Is the dll a National Instruments dll, or from another party?
Are you sure you included all additional installs in the installer? There is definitely something missing :-S
_____________________________
- Cheers, Ed
0 Kudos
Message 6 of 11
(3,766 Views)
The dll was written by me.
Meanwhile i have managed to solve this problem, now the program finds the dll (i gave the path statically) but now it cannot find the functions in it.
It sais "Missing external function: name_of_function():C in name_of_dll.dll"
And again, on my developement computer, and on another which has LV installed, IT WORKS FINE....
0 Kudos
Message 7 of 11
(3,757 Views)


waszil wrote:
...
I give the path of the dll with the "Current VI path", than strip the path, and add the DLL-s name. So in the CallLibNode I check the "specify path on diagram" option.
...

Hi waszil,
which part do you mean? Can you show us your code, maybe you can upload a picture of the blockdiagram?
Mike
0 Kudos
Message 8 of 11
(3,754 Views)
Like I said, it is solved now with static path in tha CallLibNode options.
The new problem is in my prev. post 😞
0 Kudos
Message 9 of 11
(3,746 Views)
Hi!
The problem is solved.
In the DLL project (VisualStudio) I had to use the MFC librarys in a statically linked way.
It seems, that the PC-s having LV installed, also had the MFC libraries, so the problem did not happen.
The static link makes the exe bigger, but solves the problem.
Anyway, thanks for your answers!
waszil
0 Kudos
Message 10 of 11
(3,709 Views)