Hi, I was fighting with embedding xulrunner for about two weeks now because I had problems with Webkit while using an NSAPI plugin that I wrote in GTK and still maintain: https://bugs.webkit.org/show_bug.cgi?id=100682
Fortunately, I found the Embedding/NewApi thing here: https://wiki.mozilla.org/Embedding/NewApi which uses the XRE_InitEmbedding2() and so on, but the mercurial code is a little outdated and makes compiling with more recent xulrunner versions a little problematic. ATM, I am using Fedora 17/x86_64 with Firefox/xulrunner 16.0.2. Long story short, it seems the code to embed xulrunner in external projects is still there, but the API/ABI changed somewhat since the NewApi mozembed code was last touched. The biggest problem is that these extra LDFLAGS below are needed in order to successfully call XRE_InitEmbedding2() or NS_InitXPCOM2() without a segfault: -lmozjs -Wl,--whole-archive -lmozglue -lmemory -Wl,--no-whole-archive -rdynamic These extra static and dynamic libraries are installed by the xulrunner runtime and accessible via the SDK directories, too. Maybe it would be cleaner to put these options into xulrunner's pkg-config files. The patch in the link refreshes the common and GTK portions of the NewApi mozembed code, so it compiles and links successfully with the latest 16.0.x version and the mini browser under mozembed/gtk/tests works: http://www.cybertec.at/download/embedding-newxul-v2.patch Enjoy! _______________________________________________ dev-embedding mailing list dev-embedding@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-embedding