From: Mike M. <mc...@ms...> - 2001-11-30 17:12:38
|
Here is the command line (I believe)... I think it compiles fine, fails in the linking. But the linking doesn't even show the libstdc++.a being included, even though it is included in the option box where it should be. If I uncheck the "Create a DLL" project option, then it puts the "-lstdc++" option in the link line, but not if "Create a DLL" is checked. I tried doing it from the command line, however, DOS doesn't let me run that long of a command... Ugh. This is sounding more like an IDE issue, isn't it ? Thanks, Mike 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" >From: Jose Fonseca <j_r...@ya...> >To: Mike McCue <mc...@ms...> >CC: min...@li... >Subject: Re: [Mingw-users] iostream in dll ? >Date: 30 Nov 2001 16:03:41 +0000 > >Hi, > >Perhaps your are putting the libstdc++.a before the objects files. It >must be after. > >It would help greatly if you could provide us the command line for the >linking that Dev-C++ generates or if you tried to make the dll yourself >in the command line so that we can get more hints of the source of the >problem. > >Regards, > >Jose Fonseca > >On Fri, 2001-11-30 at 14:48, Mike McCue wrote: > > For the most part, I have my dll journey figured out. I finally can get >a > > DLL to compile, and have figured out how to use it in a project, which >all > > works well. The final problem I am having is that I cannot use iostream >in > > the dll. > > > > I include iostream and try to use cout, and I get undefined reference > > errors. It was suggested that I link to libstdc++.a, which I did, and I > > still get these errors. I changed the include to stdio.h and used >printf > > and everything worked fine, I just can't figure this out. > > > > Anyone have any idea what I'm doing wrong ? > > > > Thanks, > > Mike > > > > _________________________________________________________________ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp |