From: Heiko G. <hg...@te...> - 2003-06-02 23:30:12
|
On Tuesday 03 June 2003 00:36, Francois Ferrand wrote: > > try: > > extern "C" > > BOOL APIENTRY DllMain ... > > > > Since you are using g++ the DllMain will never be found on > > startup because > > of name mangling. > > Yep, that does the trick ! Thanks ! > > However, shouldn't G++ handle this automatically ? Is this supposed to > happen sometime in the near or not so near futur ? You could use the gcc way to handle dll init code. Declare two functions like: static void MyStartupFunc(void) __attribute__((constructor)); void MyStartupFunc(void) { // your code } static void MyExitFunc(void) __attribute__((destructor)); void MyExitFunc(void) { // your code } See __attribute__ in the gcc manual or in the mingw archives. Greetings Heiko |