Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Compiling XPCOM with gecko-sdk 15 and above.

48 views
Skip to first unread message

dbli...@gmail.com

unread,
Nov 5, 2012, 6:20:05 AM11/5/12
to
Hello.

I have binary c++ XPCOM component. I've tried to build it with xulrunner-sdk-15.0.1 (16 and above) and receive linker error:

xpcomglue_s.lib(nsStringAPI.obj) : error LNK2001: unresolved external symbol __imp___snprintf
xpcomglue_s.lib(nsCRTGlue.obj) : error LNK2001: unresolved external symbol __imp__rand
xpcomglue_s.lib(nsCRTGlue.obj) : error LNK2001: unresolved external symbol __imp__srand
xpcomglue_s.lib(nsCRTGlue.obj) : error LNK2001: unresolved external symbol __imp___fdopen
xpcomglue_s.lib(nsCRTGlue.obj) : error LNK2001: unresolved external symbol __imp___dup

But I compiled it with previous xulrunner versions without errors.
Looks like they changed "Use Run-Time Library" compiler option from /MT (Multi-threaded) to /MD (Multi-threaded DLL). As I understand, the problem can be solved changing "Use Run-Time Library" in my project from /MT to /MD.
Unfortunately we are using /MT compiler option in our solution and can’t change them. I recompiled gecko sdk from sources and obtained the same result. But I can’t find out how do I change compiler options to build gecko libraries with needed runtime library usage.
Could anybody give me a hint where in the sdk these options could be changed?

jim.m...@gmail.com

unread,
Nov 6, 2012, 4:15:44 PM11/6/12
to
You should look at the new glue libraries that statically link to the crt on Windows -

XPCOM_STANDALONE_STATICRUNTIME_GLUE_LDOPTS
XPCOM_STATICRUNTIME_GLUE_LDOPTS

I believe components use the standalone which is what we use for our exe stubs.


0 new messages