List Info

Thread: Using Gecko.WebControl




Using Gecko.WebControl
user name
2008-03-02 09:01:53
Hello

I made a small application that use the control Gecko.WebControl to open some WebSite. When I run using MonoDevelop everything goes well, but when I try to run the exe file using the command: $ mono <application>.exe I get this error:

Unhandled Exception: System.TypeInitializationException: An exception was thrown by the type initializer for Gecko.WebControl ---> System.DllNotFoundException: /usr/lib/firefox/libgtkembedmoz.so
  at (wrapper managed-to-native) Gecko.WebControl:gtk_moz_embed_get_type ()
 ; at Gecko.WebControl.get_GType () [0x00000]
  at GtkSharp.GeckoSharp.ObjectManager.Initialize () [0x00000]
  at Gecko.WebControl..cctor () [0x00000] --- End of inner exception stack trace ---

 ; at Yuwie_Control.RobotPresenter.Initialize () [0x00000]
  at MainWindow..ctor () [0x00000]
  at Yuwie_Robot.MainClass.Main (System.String[] args) [0x00000]


why!?!?
I just get this error when I run using the console. The file libgtkembedmoz.so is on the place to be find:

$ ll /usr/lib/firefox/libgtkembedmoz.so
-rw-r--r-- 1 root root 79K 2008-02-07 11:08 /usr/lib/firefox/libgtkembedmoz.so


what I'm doing wrong??

Regards
Paulo Aboim Pinto
Odivelas - Portugal
--
Have income spending 5 minutes a day
Click here: http://bux.to/?r=esqueleto
Re: Using Gecko.WebControl
user name
2008-03-02 23:14:41
On Sun, Mar 2, 2008 at 10:01 AM, Paulo Aboim Pinto
<esqueletotusofona.com> wrote:
> I made a small application that use the control
Gecko.WebControl to open
> some WebSite. When I run using MonoDevelop everything
goes well, but when I
> try to run the exe file using the command: $ mono
<application>.exe I get
> this error:
>
> Unhandled Exception:
System.TypeInitializationException: An exception was
> thrown by the type initializer for Gecko.WebControl
--->
> System.DllNotFoundException:
/usr/lib/firefox/libgtkembedmoz.so

I agree, this is confusing because the DllNotFoundException
has the
full path to the .so file (from an Ubuntu DllMap I'd guess).
However,
full paths don't (always?) seem to work with DllImports. You
need to
add /usr/lib/firefox to the LD_LIBRARY_PATH environment
variable
before you start the app so that the dynamic linker can find
the
library.

<....>
> why!?!?
> I just get this error when I run using the console. The
file
> libgtkembedmoz.so is on the place to be find:
>
> $ ll /usr/lib/firefox/libgtkembedmoz.so
> -rw-r--r-- 1 root root 79K 2008-02-07 11:08
> /usr/lib/firefox/libgtkembedmoz.so
>
>
> what I'm doing wrong??

The reason that is works from within MonoDevelop is that MD
sets the
LD_LIBRARY_PATH for GtkMozEmbed already in its own launch
script. If
you look in the MD launch script you can find some nice
Gecko
autodetection code that you're welcome to use...

-- 
Michael Hutchinson
http://mjhutchinson.com
_______________________________________________
Monodevelop-list mailing list
Monodevelop-listlists.ximian.com
http://lists.ximian.com/mailman/listinfo/monodevelop-li
st

[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )