Linking errors with Mingw and Gecko cygwin/mscv SDKs

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Linking errors with Mingw and Gecko cygwin/mscv SDKs

christopher taylor-2
Hello!
I'm currently writing an XPCOM C++ extension for Firefox . I am having
linking problems. I downloade the msvc and cygwin Gecko SDKs and I've
tried every technique under the sun to expose xpcom.dll to the mingw
g++ compiler & linker.

I've tried linking the dll and the *.lib files that come with the
gecko SDK to the mingw g++ world. No dice.

The best I can come up with is converting the dll and the lib files
into *.a achives and I keep having a linking problem to the effect of:

> 'undefined reference to nsMemory::Clone(void const*, unsigned int)'
> 'undefined reference to NS_NewGenericModule2(nsModuleInfo *, nsIModule **)'

I'm working with the latest MinGW and Windows XP

Thanks for listening!

Christopher Taylor

_______________________________________________
mozilla-builds mailing list
[hidden email]
http://mail.mozilla.org/listinfo/mozilla-builds
Reply | Threaded
Open this post in threaded view
|

Re: Linking errors with Mingw and Gecko cygwin/mscv SDKs

Chris Seawood
christopher taylor wrote:

> Hello!
> I'm currently writing an XPCOM C++ extension for Firefox . I am having
> linking problems. I downloade the msvc and cygwin Gecko SDKs and I've
> tried every technique under the sun to expose xpcom.dll to the mingw
> g++ compiler & linker.
>
> I've tried linking the dll and the *.lib files that come with the
> gecko SDK to the mingw g++ world. No dice.
>
> The best I can come up with is converting the dll and the lib files
> into *.a achives and I keep having a linking problem to the effect of:
>

mingw gcc uses a different vtable layout than MSVC so you cannot use g++
to link against MSVC-built libraries or vice-versa.  That should be in
one of the mingw FAQs.   Your extension will have to be built with a
compiler that matches the one used to build the gecko-sdk.

- cls
_______________________________________________
mozilla-builds mailing list
[hidden email]
http://mail.mozilla.org/listinfo/mozilla-builds