11-26-2008 12:23 AM
Eugen Graf wrote:So, I made a very simple example using all driver VIs, which call this DLL and build an exe from this exapmle. I got no problems, no errors. So I can say the problem is not the call of the DLL. The DLL was automaticaly put in the data folder from Exe Builder and was found from the LV Run Time.
Message Edited by Eugen Graf on 11-25-2008 04:43 PM
Not surprising
If the DLL is self contained it will always work that way. When LabVIEW builds the executable it sees that this DLL is required by some VIs, adds it to the support directory and adjusts the path inside the VIs to point relative to the VI to that DLL before adding them to the executable stub. No biggy!
If the DLL however depends on other DLLs that are not part of the OS, already installed systemwide or inside a directory that is added to the PATH environment problems start to surface. The only way to make the main DLL work is to get those secondary DLLs in one of the above mentioned locations (system32 or somewhere with adjusted PATH environment) or - and this has always my preference - inside the application directory, that is where <myapp>.exe is. Since secondary DLLs go into the application directory in all builds I do I usually adjust the builder settings to make the support directory (the default data subdirectory) to point to the application directory too, so that all my dlls are there and not some inside the data subdirectory and others inside the application directory.
Rolf Kalbermatter
11-26-2008 04:31 PM
Thankyou Rolf, your answer don't explain and solve the problem. The second patr of your answer is also - you think that the DLL I use in my project uses ather DLL, which is not included into the executable build. Of course, LV can't know about it. But I made other projects using this DLL and it have work directly after installation.
Furthermore as I sad, I made a very simple programm using VIs, which call these DLL and this programm works too. So the problem is covered somewhere esle.
More suggestions? The problem is not solved yet. Of course I remade my project to use an another CAN Dongle without such problems, but I want to find out what problem it is. Please help.
If anybody want to see my project (which do not work) or the simple project (which works) I can post both of them. I hope the problem will be solved in the near time.
Thank you
11-26-2008 04:55 PM
11-26-2008 06:17 PM
Now, as I tryed to make a code distribution of my project and finaly I made a full distribution (all VIs and dependencies in one folder) I copied the project to this folder too.
Than I opened the project and all VIs were found except of the CAN VIs. I tryed to solve conflicts and selected the new path ( the old was CAN/CAN.vi and the new one CAN.vi). So if I rebuild new Exe it works.
My opinion of the problem is now - autopopulating folders. But now I don't want to publish my project here. If anybody from NI want to debug this problem, so I may mail a copy (confidenytly) of my old project.
Thank to all, my problem is solved building a source distribution and corrected conflicts with pathes.