01-29-2010 08:16 AM
Good Morning,
I'm having some problems trying to build an "exe" of my current project. The build starts and then fails pretty early, indicating that it can't copy the Windows "kernel32.dll" to the build's support folder. As I am building this exe to run on the machine that it is being built on I have no desire to copy that dll, nor any of the others, but I can not remember, nor figure out how to tell the build to leave it alone. I don't know if it will have the same problem with the others, installed when various instruments, etc. were installed. I just want to be able to go to an exe and get the development version off of the system, before some curious technician decides to "learn" LabVIEW and messes up the program (I used to be that technician!).
Thanks,
Putnam Monroe
01-29-2010 09:07 AM
Also happened with me some time ago. The reason was that full path to kernel32.dll was entered in DLL call and no PATH variable was set to Windows\System32\ folder. Then copy of kernel32.dll was copied to \data folder. Since that I never select kernel32.dll from System32, but only type "kernel32.dll", user32.dll, etc, and problem goes away. Something like that. Don't remember which LabVIEW it was - somewhere between 8.2 - 8.6.
Andrey.
02-01-2010 10:13 AM
02-02-2010 11:30 AM
02-02-2010 11:59 AM
Normally LabVIEW should not make a copy of DLLs from System32 directory to the targed directory in case if kernel32.dll called simply like this:
Then kernel32.dll will be not copied to data folder (was not created in my case):
but if you perform call like this:
Then LabVIEW will make a copy of kernel32.dll in the data folder:
So, you should be sure, that all kernel32.dll calls performed without full path to C:\Windows\System32.
What also may happened - kernel32.dll was "relinked" to data folder, like this:
Of course, this is totally wrong (and then error occurred by build).
Also you can check dependencies list:
Hope it helps a little bit.
Andrey.
02-02-2010 11:59 AM
02-02-2010 02:35 PM
Thank you both for clarifying the issue, particularly Andrey for the wonderfully illustrated tutorial! This is why this is such a powerful forum, one that I recommend to all the LabVIEW programmers, new and not so new, the knowledge as well as the work that sometimes goes into an answer. I'm not sure where in my code I'm making that call, this project has been going on for several months, with some of the code being legacy from previous projects, although I don't think that is where this problem came from as I haven't run into it before.
Thanks again. I will mark it answered once I have actually built an .exe.
02-06-2013 10:07 PM
I have same problem.
I try to fix incorrect calls to kernel32 as described above.
I right click on kernel32 in dependencies and press Find\Callers. LV find some VIs and I check calls of kernel32 in this VIs. In one VI I find incorrect call to kernel32 (with path) and fix it (remove path). But after that compiling error still present. May be I dont find all calls to kernel32? But project very big and i dont know other way to find calls to kernel32 except from dependencies.
OS Win7 pro 32
02-07-2013 05:12 PM
I'm not sure that you've provided enough information for us to narrow down the issue. What error message(s) are you recieving, and do you know which .dll's used in your project are making calls to kernel32? Also note that this thread is a few years old and you might get a more active discussion by posting a new thread on this.
05-08-2013 08:04 AM
I ran into the same issue, the build was copying the Kernel32.dll to the build folder. By calling it only by its name (kernel32.dll) on the LibraryCall fixed the issue.
Thanks!