Discussion:
unable to locate dll when using custom build
(too old to reply)
Frederiek
2006-03-10 14:31:45 UTC
Permalink
Hi,

I'm using Visual C++ 6.0 (VS6.0 SP6) on Windows XP Professional SP2.

I experience a problem with a custom build setting that executes my
executable after compilation and linkage, to perform some registration.
The problem is that apparently some DLLs fail to load, because my exe
didn't find them. Following is the message I get.

myprogram.exe - Unable To Locate Component
This application has failed to start because 3rdpartylib.dll was not
found. Re-installing the application may fix this problem.

I verified that the path for these DLLs is part of the PATH system
variable. So I don't understand why it can't find them. Furthermore
there is no problem with executing the release version of my exe. By
the way, the custom build setting is only needed for the debug version.
There is also not a problem with loading DLLs when I execute the debug
version. The problem only occurs through the custom build setting.

I found a solution, in that I need to explicitly set every directory
for DLLs being used by my executable, in the
Options->Directories->Executable files list. I cannot remember that I
ever needed to do this before. Doesn't VC use the PATH system variable
when performing custom build commands? I also restarted the system to
see if it was a temporary problem, but to no avail. The weird thing is,
it only happens with the custom build setting.

Does anybody know how I can avoid the need to indicate the location of
the used DLLs in this case?

Regards,

Frederiek
Ancient Dragon
2006-03-10 16:19:27 UTC
Permalink
copy the dll into a directory that is in the environment PATH, or in the
directory where your program is starting.
Binsky
2006-03-27 11:48:01 UTC
Permalink
Post by Ancient Dragon
copy the dll into a directory that is in the environment PATH, or in the
directory where your program is starting.
Hello,

I am having similar problems, and thought I'd try for some help...

I have been trying (unsuccesfully) to port my working PPC2003 EVC4.0
application to visual studio 2005, to be able to support Mobile 5 PDAs. My
application compiles and links correctly, but is unable to run on my device.
At first I got no notification, just an application that didn't respond.
After fiddling about with the project options, I got a message telling me
certain elements could not be found.

Using the dependency walker, I noticed several dll's where missing in my
build. By copying those dlls to my output directory, I got a little further.
But now I'm stuck again, and it's probably because I'm missing some essential
piece of knowledge.

At this time, the dependency walker tells me that the following dll's are
missing:
- aygshell.dll
- cemapi.dll
- commctrl.dll
- coredll.dll
- ws2.dll

The only one I explicitly use is the cmapi.dll, but I link a library (.lib),
and do not actually have a cemapi.dll...

What am I doing wrong?

Thanks in advance,

Robin Oudhuis

Loading...