From: Markku S. <mst...@cc...> - 2002-03-05 15:38:29
|
Hi, I'm trying to build and load a DLL wrapper, which will log function calls to another DLL. I haven't been able to find any GCC specific info on this around the web. I built the example DLL application, which was explained on MinGW web page, like this: main.c ---- #include "hellolib.h" int main () { tstfunc (); return (0); } hellolib.h ---- #ifdef BUILD_DLL // the dll exports # define EXPORT __declspec(dllexport) #else // the exe imports # define EXPORT __declspec(dllimport) #endif // function to be imported/exported EXPORT void tstfunc (void); hellolib.c ---- #include <stdio.h> #include "hellolib.h" EXPORT void tstfunc (void) { printf ("Hello\n"); } So what steps do I need to take, to make a wrapper DLL using MinGW, and load the DLL, when program is excecuted? What if I didn't have the hellolib source code? |