hi
I am using mozilla 1.7.13 source on redhat.
I am having a wierd problem. The NS_InitEmbedding fails if I even
instantiate anything after it.
If I comment out that line, it succeeds.  I stripped down my program to
the smallest code which reproduces the problem, see below. If you see
anything wrong or just completely incorrect, please suggest.
TIA

#include <stdio.h>
#include "nsISupports.h"
#include "nsEmbedAPI.h"
#include "nsIWebBrowser.h"

int main (int argc, char* const * argv)
{
 nsresult rv;
 rv = NS_InitEmbedding(nsnull, nsnull);
 if(NS_FAILED(rv))
 {
  printf("NS_InitEmbedding Failed. Returns [%x].\n", rv);
  return -1;
 }
 printf("NS_InitEmbedding Succeeded. Returns [%x].\n", rv);
 rv = NS_OK;
 //nsCOMPtr<nsIWebBrowser> mWebBrowser; // <-- THIS LINE
  return 0;
}
// Compile line is below
c++ -g -Wall -Wno-non-virtual-dtor -o test main.cpp  -DXPCOM_GLUE -I
../../mozilla/dist/sdk/include -I ../../mozilla/dist/include/xpcom/
-L/../../mozilla/dist/sdk/lib -lxpcomglue -lnspr4 -lplds4
-lembed_base_s -fno-rtti -fno-exceptions  -L../..//mozilla/dist/sdk/bin
-lxpcom

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

Reply via email to