I tried to write a Gecko Embedding for Dummies last night,
but I'm too dumb. I was hoping I could just use the Gecko SDK,
so I downloaded it (the GNU/Linux version) from
ftp://ftp.mozilla.org/pub/mozilla.org/mozilla/releases/mozilla1.7.13/gecko-sdk-i686-pc-linux-gnu-1.7.13.tar.gz
But when I tried to compile a trivial file with
#include "nsEmbedAPI.h"
at the top, it failed because one of its #include files can't find
"nsDirectoryServiceUtils.h" (which is in xpcom/io/nsDirectoryServiceUtils.h
of the Mozilla source but not in the 'include' directory of the Gecko SDK;
my compile line had "-I gecko-sdk/include" as the only include directory).
I concluded that I need to build the entire source tree myself.
Is that correct?
For reference, this was based on the post from Swapnil the other day,
which I tried to strip to a minimum:
/*
g++ -Wall -Wno-non-virtual-dtor \
-I gecko-sdk/include \
-L gecko-sdk/lib -lembed_base_s \
-o test test.cpp
*/
#include <stdlib.h>
#include <stdio.h>
#include "nsEmbedAPI.h"
int main (int argc, char *argv) {
nsresult rv; // nscore.h
rv = NS_InitEmbedding(nsnull, nsnull); // nsEmbedAPI.h
if (NS_FAILED(rv)) { // nsError.h
printf("NS_InitEmbedding failed (%x)\n", rv);
return EXIT_FAILURE;
} else {
printf("NS_InitEmbedding success\n");
return EXIT_SUCCESS;
}
}
_______________________________________________
dev-embedding mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-embedding