LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

DLL not working after building EXE

Hi All
 
I have this VI (program) that calls a dll wrapper which calls a dll.  The parameter that I am passing is  the "path" and a data (txt) file that I am going to be parsing inside the DLL. Everything work fine when I use the LabView development package. However, when I build an .exe and I try to run this .exe I get an error message from the dll saying that it got an error parsing the file.
I check to make sure my dlls are all there and they are.
 
Does anyone has a clue on what is going on? Did the building of an exe change my data type?
 
Thanks
 
     
0 Kudos
Message 1 of 6
(3,439 Views)


@Togos wrote:
Hi All
 
I have this VI (program) that calls a dll wrapper which calls a dll.  The parameter that I am passing is  the "path" and a data (txt) file that I am going to be parsing inside the DLL. Everything work fine when I use the LabView development package. However, when I build an .exe and I try to run this .exe I get an error message from the dll saying that it got an error parsing the file.
I check to make sure my dlls are all there and they are.
 
Does anyone has a clue on what is going on? Did the building of an exe change my data type?


More likely you are referencing the file name to pass, indirectly from the current VI. This path is not exactly the same in a built application than in the development environment. While the development path of a VI will be reported as <your dir>/<VI name>.vi in an executable you get <app dir>/<app name>.exe/<VI name>.vi.

Rolf Kalbermatter

Message Edited by rolfk on 04-20-2006 09:42 AM

Rolf Kalbermatter  My Blog
DEMO, Electronic and Mechanical Support department, room 36.LB00.390
0 Kudos
Message 2 of 6
(3,435 Views)

Thank you for your answer.

Yes, I am aware of this "exutable path" which is different to my development path however I connected probes(displays) just before DLL icon (function) and I can see the path going into the DLL stays the same than the development path.

And I have the files (Dlls, Txt) and both exe path and development.

Am I overlooking  something?

Tanks

0 Kudos
Message 3 of 6
(3,425 Views)
Togos,
Are you including the dll in your support files when building your application? There is a KnowledgeBase that addresses this question. What is the exact error that is being returned? Post to let us know when you get the chance.
 
Best Regards,
 
Chris C
Applications Engineering
National Instruments
0 Kudos
Message 4 of 6
(3,413 Views)

Actually, the exe is finding the DLL this I can verify. The problem is I am passing a string to the call node (which is a DLL but a wrapper) this wrapper pass it to 2nd DLL. The string is a pointer that supposely point to the path where my .txt file that we are going to parse.

The problem is: It does not find the txt file Some how is pointing to some place else.

 

Thanks 

0 Kudos
Message 5 of 6
(3,403 Views)
Togos,

Can you place the EXE in the same folder as the VI to make sure that everything that it is looking for is available.  To help decode this I might suggest hardcoding this path to that folder, which could also contain the TXT file that you are looking for.  If this works then we know that it is probably a path issue.  Since this works in the development environment this is the only thing that I can think of that would be causing this error.  If you continue having problems, then I might suggest that you create a small example program that recreates this issue and post it.

Hope it helps!
Andy F.
-----------------------------------------------------------------
National Instruments
0 Kudos
Message 6 of 6
(3,384 Views)