For the OS to 'know' that 'nhlgraphic.dll' is needed, you must have linked its associated export library to your code. Posting the Compile Log tab text from the build of this code would have indicated whether that was the case.
Note that if you link an export library, you do not need to also call LoadLibrary() for the same DLL.
Clifford
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
A Library that was working stopped working.
I'm using Dev-cpp 5.0 Beta
A test console program I did confirms it. Here's the testing code:
include <windows.h>
include <iostream>
include <cstdlib>
using namespace std;
int main(int argc, char *argv[])
{
LPCSTR libName = "../DLL/nhlwnd.dll";
HINSTANCE lib = LoadLibrary(libName);
if (lib) {
cout << "loaded\n";
FreeLibrary(lib);
} else cout << "not loaded\n";
}
The output at runtime: a Windows system MessageBox alerting me that "The application can't be started because 'nhlgraphic.dll' can't be found.
That's the stuff: nhlgraphic.dll is a dll I made using DevIL library, but that's not called, nor mentioned, nor used in this simple test.
If I try to load this graphic dll, instead of the one i plugged in the testing code (nhlwnd.dll), it does work.
Has anyone an idea of what's comin'up??? I'm going slightly mad!
For the OS to 'know' that 'nhlgraphic.dll' is needed, you must have linked its associated export library to your code. Posting the Compile Log tab text from the build of this code would have indicated whether that was the case.
Note that if you link an export library, you do not need to also call LoadLibrary() for the same DLL.
Clifford