LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Trouble installing executable with DLLs- configuration issue

I've used LabVIEW's "Build Applications/ Installer" to make an installer for a VI that calls some functions from a DLL I wrote (I'm using LabVIEW 6.1.)
 
On some machines it installs fine.  On others I get errors saying "the application is incorrectly configured".
If I manually edit the .ini file to tell the execuble to look in the directory where the DLL is located (Program FIles\AppName) I get dialogue boxes (one for each DLL node in the diagram), I select the correct DLL library, and each time I hit the OK button I get the "Application incorrectly configured" error.
 
I have not been able to determine what detail of the Windows environment determines whether the executable will load correctly or not.  It doesn't seem to be which *version* of Windows - it works on everything from a Windows 2000 machine to my new Dell ... but it doesn't work on another employee's identical new Dell that came in the same shipment!
 
Anybody have any ideas what might be going on?
0 Kudos
Message 1 of 2
(2,319 Views)
Working with NI we've determined that the problem is that I'm compiling with Microsoft's Visual C++ 2005 Express.
THe instal works on any computer that has ever had LabVIEW 6.1 installed on it, and works on any computer that has ever had VC++ 2005 installed on it, but causes errors on any computer that has not had either installed.
 
It seems that VC++2005 creates a dependency on a Windows dll called MSVCR80.DLL, and even if you include it in the additional files in the NI installer, there's still some other stuff you have to do to allow the DLL you created to find it when it tries to run.
 
So I swtiched to Borland Turbo C++ express, and after a little sweating figured out the if I put "Extern C" in front of my "__declspec(dllexport)" I didn't have to figure out how Borland handles function name decoration, and now everything's working.
0 Kudos
Message 2 of 2
(2,273 Views)