The library created with the dll is the import library...it tells the linker what the program expects to import......I'm suprised the project links without this library being added to the exe...
The def file is created with the dll project like so
and it tells the linker which functions to add to the dll's export table. I dont know how Devc++ uses def files......I do all my dlls with the Microsoft Linker in VC++ or MASM32 (VC++ has a better method than defs....__declspec(dllexport))......with that linker, if you used a def file you would add def file with the params you send when linking
Ok...if you are sure the dll is fine.....try this
Say the function you are exporting is declared like
Adapt this pseudocode and put it in your code
Here you are loading the dll at runtime and finding where the function you need is...then you are assigning it to a function pointer and then calling it.
typedef int (MYEXPORTEDFUNC*)(int);
HMODULE hMod = LoadLibrary("MyDll.dll");
int nRes = lpfMyExportedFunc(50);
lpfMyExportedFunc = NULL;
I havent tested the above, but all those functions are on MSDN