Hi Darin,

Thanks for the great help !

......
After I build it with the same setting, it works for 1.4, but there is below error with 1.7:
/>mozembed-test
mozembed-test: relocation error: mozembed-test: undefined symbol: _ZTV16nsQueryInterface


So, I changed the building setting following your suggestion:
......
c++ -o mozembed-linux-gtk2 -fno-rtti -fno-exceptions -Wall -Wconversion -Wpointer-arith -Wcast-align -Woverloaded-virtual -Wsynth -Wno-ctor-dtor-privacy -pedantic -Wno-long-long -fshort-wchar -pthread -pipe -DNDEBUG -DTRIMMED -O GtkMozEmbed.o -L/home/george/mozilla_all/mozilla1.4/mozilla/dist/bin -lgtkembedmoz -lmozjs -lpthread -ldl -Wl,--export-dynamic -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgdk_pixbuf-2.0 -lm -lpangoxft-1.0 -lpangox-1.0 -lpango-1.0 -lgobject-2.0 -lgmodule-2.0 -ldl -lglib-2.0 -L/home/george/mozilla_all/mozilla1.4/mozilla/dist/sdk/embedstring/bin -lembedstring -L/home/george/mozilla_all/mozilla1.4/mozilla/dist/sdk/embed_base/bin -lembed_base_s -L/home/george/mozilla_all/mozilla1.4/mozilla/dist/sdk/xpcom/bin -lxpcomglue_s -lxpcom -L/home/george/mozilla_all/mozilla1.4/mozilla/dist/sdk/nspr/bin -lnspr4 -lplds4 -lplc4


But it "Segmentation fault" with 1.7, the stack trace is:
(gdb) run
Starting program: /tmp/test_gtk/mozembed-test
[New Thread 1024 (LWP 2566)]

Hmm... nsQueryInterface is interesting because I know for a fact that 1) it is part of the xpcom/glue code, and 2) that it has changed between Mozilla 1.4 and 1.7. This crash appears to be caused by libxpcom.so from Mozilla 1.7 trying to use the version of nsQueryInterface from Mozilla 1.4. That can be solved by making sure that your executable does not "export" its version of nsQueryInterface.

I checked that: /> nm mozembed-linux | grep QueryInterface 0805f460 V _ZTV16nsQueryInterface

So, looks like it's exported. But this function is not used directly in my source code. Seems that
it's introduced by linking to libxpcom.so. How can I make it not "export"ed ?


Thanks,

-George.




_______________________________________________ Mozilla-xpcom mailing list [EMAIL PROTECTED] http://mail.mozilla.org/listinfo/mozilla-xpcom

Reply via email to