I thought I would include a little more detail since it is definitely
something I am doing wrong and it is most certainly something simple. I
am still learning gcc so please be patient and don't laugh if you see
an obvious mistake:)
I just tried using Firefox 1.5 this time and still getting the same
results. Actually the Segmentation fault (core dumped) is displayed
immediately instead of after the window opens as before.
I am compiling the test code like this:
gcc test.cpp -o test `pkg-config --cflags --libs gtk+-2.0`
-I/home/glantz/thumbserver/mozilla1.5/embedding/browser/gtk/src
-L/home/glantz/thumbserver/mozilla1.5/dist/Embed -lgtkembedmoz -lxpcom
-lmozjs -lxpcom_core
I also do some symbolic links:
ln -s /home/glantz/thumbserver/mozilla1.5/dist/Embed/libgtkembedmoz.so
/usr/lib/libgtkembedmoz.so
ln -s /home/glantz/thumbserver/mozilla1.5/dist/Embed/libxpcom.so
/usr/lib/libxpcom.so
ln -s /home/glantz/thumbserver/mozilla1.5/dist/Embed/libxpcom_core.so
/usr/lib/libxpcom_core.so
ln -s /home/glantz/thumbserver/mozilla1.5/dist/Embed/libmozjs.so
/usr/lib/libmozjs.so
glantz wrote:
> Well I am new at embedding mozilla. I am using the xulrunner 1.8 Linux
> version. Inside the root directory is the shared objects for
> GtkMozEmbed.
>
> It does not complain of missing libraries or any other errors for that
> matter during the build or when you run the test app. It only shows the
> error when you add a url as the argument. It looks like it tries to
> load, then crashes. Thanks for taking the time to reply.
>
>
> Antonio Gomes wrote:
> > glantz,
> >
> > gtkmozembed is passing by major changes. Could you please inform which
> > branch/mozilla_source_base are you linking you app against , and also
> > how it it getting linked ?
> >
> > regards
> >
> > On 18 Jan 2007 11:00:09 -0800, glantz <[EMAIL PROTECTED]> wrote:
> > > I am trying to run a simple test with GtkMozEmbed. The test I am using
> > > compiles and runs and opens a window, however when I specify an address
> > > to load it shuts down with a "Segmentation fault (core dumped)"
> > > message. Any ideas or suggestiions why I might get this? I believe it
> > > may be a shared library or something missing, but that is just a guess.
> > > I don't know how to find out what is causing it. Below is my code. even
> > > if you have a suggestion, it is very much appreciated.
> > >
> > > #include "gtkmozembed.h"
> > > #include <gtk/gtk.h>
> > > #include <stdio.h>
> > > #include <string.h>
> > > #include <stdlib.h>
> > >
> > > main(int argc, char **argv)
> > > {
> > >
> > > GtkWidget *topLevelWindow;
> > > GtkWidget *topLevelVBox;
> > > GtkWidget *mozEmbed;
> > > int loadPercent;
> > > int bytesLoaded;
> > > int maxBytesLoaded;
> > >
> > > gtk_set_locale();
> > > gtk_init(&argc, &argv);
> > >
> > > gtk_moz_embed_set_profile_path("/home/glantz/thumbserver", "test");
> > >
> > > // create our new toplevel window
> > > topLevelWindow = gtk_window_new(GTK_WINDOW_TOPLEVEL);
> > >
> > > // new vbox
> > > topLevelVBox = gtk_vbox_new(FALSE, 0);
> > > // add it to the toplevel window
> > > gtk_container_add(GTK_CONTAINER(topLevelWindow),topLevelVBox);
> > >
> > > // add mozilla
> > > mozEmbed = gtk_moz_embed_new();
> > > // add it to the toplevel vbox
> > > gtk_box_pack_start(GTK_BOX(topLevelVBox), mozEmbed,
> > > TRUE, // expand
> > > TRUE, // fill
> > > 0); // padding
> > > gtk_moz_embed_set_chrome_mask(GTK_MOZ_EMBED(mozEmbed),
> > > GTK_MOZ_EMBED_FLAG_ALLCHROME);
> > >
> > > //size the widget
> > > gtk_widget_set_usize(mozEmbed, 800, 600);
> > >
> > > if (argc > 1)
> > > gtk_moz_embed_load_url(GTK_MOZ_EMBED(mozEmbed), argv[1]);
> > >
> > > // show the widgets
> > > gtk_widget_show(topLevelWindow);
> > > gtk_widget_show(topLevelVBox);
> > > gtk_widget_show(mozEmbed);
> > >
> > > if (argc > 1)
> > > gtk_moz_embed_load_url(GTK_MOZ_EMBED(mozEmbed), argv[1]);
> > >
> > > gtk_main ();
> > > return 0;
> > > }
> > >
> > > _______________________________________________
> > > dev-embedding mailing list
> > > [email protected]
> > > https://lists.mozilla.org/listinfo/dev-embedding
> > >
> >
> >
> > --
> > --Antonio Gomes
_______________________________________________
dev-embedding mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-embedding