Mook wrote:

> Other non-inline methods such as nsAString::AssignLiteral [2] seems to
> behave identically.
> 
> This seems to be related to bug 340446 ... but I _am_ linking against
> xpcomglue_s.  For reference, my link line is:
> 
> 
> g++ -shared -o mimetex.so -lm
> -L/home/mook/mozilla/trunk/obj/Firefox/dist/sdk//lib/ -lxpcomglue_s
> -lxpcom -lplds4 -lpc4 -lnspr4 gifsave.obj mimetex.obj globals.obj
> wrapper.obj mtTeXRasterizer.obj module.obj

Actually, you're not linking against xpcomglue_s ;-)

GCC link lines are order-dependent. You have to list the object files first
and then the libraries which provide the symbols they need. Try this:

g++ -shared -o mimetex.so
-L/home/mook/mozilla/trunk/obj/Firefox/dist/sdk/lib gifsave.obj mimetex.obj
globals.obj wrapper.obj mtTeXRasterizer.obj module.obj -lxpcomglue_s -lxpcom
-lplds4 -lplc4 -lnspr4 -lm

> P.S. Would it be possible to check that wchar_t is indeed two bytes long
> when HAVE_CPP_2BYTE_WCHAR_T is defined in xpcom-config.h?  Ending up
> with my wchar_t compiled as four bytes each confused it somewhat...

You write the patch, I'll review it.

--BDS
_______________________________________________
dev-tech-xpcom mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-tech-xpcom

Reply via email to