Click to See Complete Forum and Search --> : dll not found error


alptek
July 7th, 2005, 07:09 AM
i compile and build my application but when executing it gives xx.dll not found error. what can be the problem?

wildfrog
July 7th, 2005, 08:47 AM
It probably means that your program needs the specified dll, but it cannot find it.

When looking for a DLL these directories will be searched:
- The directory from which the application loaded.
- The current directory.
- The system directory. Use the GetSystemDirectory function to get the path of this directory.
- The 16-bit system directory. There is no function that obtains the path of this directory, but it is searched. Windows Me/98/95: This directory does not exist.
- The Windows directory. Use the GetWindowsDirectory function to get the path of this directory.
- The directories that are listed in the PATH environment variable.

If the DLL isn't in one of these directories then you could either copy/move it there, or you can specify the directory in the PATH environment variable.

If you're dealing with Run-time dynamic linking you can also use the SetDllDirectory(...) to modify your search path.

- petter

alptek
July 7th, 2005, 10:23 AM
thanks. i solved the problem. i added a path to the enviromental variables