« Return to Thread: How to create a relocatable dll with mingw

Re: How to create a relocatable dll with mingw

by Alias John Brown :: Rate this Message:

| View in Thread





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.
     
------------------------------------------------------------------------------
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
MinGW-users@...

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:mingw-users-request@...?subject=unsubscribe

 « Return to Thread: How to create a relocatable dll with mingw