WARNING: This server is unstable and will be retired in the next days.
If you want to keep this forum available, please request immediately a migration
on the Nabble Support forum.
Forums that don't receive any migration request will be deleted forever.
--- On Fri, 4/20/12, Earnie Boyd <earnie@...> wrote:
> From: Earnie Boyd <earnie@...>
> Subject: Re: [Mingw-users] How to create a relocatable dll with mingw
> To: "MinGW Users List" <mingw-users@...>
> Date: Friday, April 20, 2012, 5:16 AM
> On Thu, Apr 19, 2012 at 2:32 PM,
> Srinivas Cherukumilli <vasu_c@...>
> > --- On Thu, 4/19/12, Earnie Boyd <earnie@...>
> >> From: Earnie Boyd <earnie@...>
> >> Subject: Re: [Mingw-users] How to create a
> relocatable dll with mingw
> >> To: "MinGW Users List" <mingw-users@...>
> >> Date: Thursday, April 19, 2012, 11:00 AM
> >> Do not top post.
> >> On Thu, Apr 19, 2012 at 1:45 PM, Srinivas
> >> <vasu_c@...>
> >> wrote:
> >> >
> >> > Thanks for the response Earnie,
> >> >
> >> > But, unfortunatley it does not work.
> >> >
> >> > gcc complains about the missing '.a'
> >> > $ gcc -shared -o test1.dll test1.o
> >> libtest1.dll.a
> >> > gcc.exe: libtest1.dll.a: No such file or
> >> >
> >> Sorry it should be -Wl,--out-implib,libtest1.dll.a
> since it
> >> is a linker option.
> > Thanks again Earnie.
> > Sorry about top posting. Not used to sending mails to
> > I still have issues with using the -Wl,relocatable and
> -shared options together.
> > So, for the two commands you suggested:
> > (1) gcc -shared -o bar.dll bar.o
> > (2) gcc -Wl,-relocatable -shared -o bar.dll bar.o
> > Step (1) works. Get linker errors for step (2). I
> hope I got all the options right in step (2).
> Oh, sorry for the confusion. (///) --relocatable isn't
> usable with
> -shared. You can use --embedded-relocs with -shared
This switch did not help either. I have attached a small test case where the program that loads up the dll's is compiled with Visual Studio 9.0 and the dll's are compiled using gcc-4.2.1-mingw32 and this has the MSVCR90.
I have left my executables etc. as-is in the attached tar file. One person on this mailing list already tried building and running this with gcc-4.5.x and seemed to work for him.
Would appreciate if anyone else could try and suggest a workaround/solution to this issue as upgrading to a newer gcc is not a viable option for us. I can attach my version of the mingw compiler as well if needed.
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!
MinGW-users mailing list
This list observes the Etiquette found at
We ask that you be polite and do the same. Disregard for the list etiquette may cause your account to be moderated.