From: Srinivas C. <va...@ya...> - 2012-04-19 21:31:28
|
--- On Thu, 4/19/12, John Brown <joh...@ho...> wrote: > From: John Brown <joh...@ho...> > Subject: Re: [Mingw-users] How to create a relocatable dll with mingw > To: min...@li... > Date: Thursday, April 19, 2012, 2:08 PM > > > > > On Date: Thu, 19 Apr 2012 11:32:54 -0700, Vasu wrote: > > > > > So, for the two commands you suggested: > > (1) gcc -shared -o bar.dll bar.o > -Wl,--out-implib,libbar.dll.a > > (2) gcc -Wl,-relocatable -shared -o bar.dll bar.o > -Wl,--out-implib,libbar.dll.a > > > > Step (1) works. Get linker errors for step (2). I hope > I got all the options right in step (2). > > > > Vasu > > > Hello Vasu, > You did not post your linker errors, but if your library > calls functions in otherlibraries, then you need to include > those libraries in your command line, for example (not > tested): > gcc -Wl,-relocatable -shared -o bar.dll bar.o > -Wl,--out-implib,libbar.dll.a -lOtherLib1 -lOtherLib2 > Regards,John Brown. Hi John, The linker complains about using -relocatable and -shared together. I have pasted the errors below. gcc -Wl,--relocatable -shared -o test1.dll test1.o -Wl,--out-implib,libtest1.dll.a .../bin/../libexec/gcc/mingw32/4..1/ld.exe: -r and -shared may not be used together collect2: ld returned 1 exit status Thanks for your help. Vasu > > > > > ------------------------------------------------------------------------------ > For Developers, A Lot Can Happen In A Second. > Boundary is the first to Know...and Tell You. > Monitor Your Applications in Ultra-Fine Resolution. Try it > FREE! > http://p.sf.net/sfu/Boundary-d2dvs2 > _______________________________________________ > MinGW-users mailing list > Min...@li... > > This list observes the Etiquette found at > http://www.mingw.org/Mailing_Lists. > We ask that you be polite and do the same. Disregard > for the list etiquette may cause your account to be > moderated. > > _______________________________________________ > You may change your MinGW Account Options or unsubscribe > at: > https://lists.sourceforge.net/lists/listinfo/mingw-users > Also: mailto:min...@li...?subject=unsubscribe > |