I have finally accomplished compiling a dll and a project that uses it,
thanks to those that helped!
My only problem now is that I cannot use iostream's cout within the DLL, I
get undefined reference errors... I've been working on this in the mingw
mailing list, and came across an interesting discovery today...
I'm trying to include the libstdc++.a library into the dll project, but its
not getting passed on the command line at link time. Here is the compile
and Link command lines :
----------
Compiling files :
C:\OPENGL\DEV-C_~1\BIN\gcc -c -DBUILDING_DLL=1 -I. "c:\opengl\using a
dll\printdll\print.cpp" -s -mwindows -IC:\OPENGL\DEV-C_~1\INCLUDE\
-IC:\OPENGL\DEV-C_~1\INCLUDE\G__~1 -IC:\OPENGL\DEV-C_~1\INCLUDE\
-LC:\OPENGL\DEV-C_~1\LIB\ -BC:\OPENGL\DEV-C_~1\BIN\
Linking files :
C:\OPENGL\DEV-C_~1\BIN\dllwrap --export-all --output-def
C:\OPENGL\USINGA~1\PRINTDLL\dll.def --implib
"C:\OPENGL\USINGA~1\PRINTDLL\libPrintdll.a" -o
c:\opengl\usinga~1\printdll\Printdll.dll "c:\opengl\using a
dll\printdll\print.o"
----------
If, in project options, I uncheck the box that says "Create a DLL" then I
will see "-lstdc++" on the link command line, but not if the "Create a DLL"
option is checked. Is this a bug within Dev-C++ ? I tried running the
linking command, with all the options, from a dos window but the command is
too long.
Thanks for any help,
Mike
_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp
|