[Gtk-sharp-list] gtksharpglue-2

Rafael Teixeira monoman at gmail.com
Tue Jul 18 09:38:17 EDT 2006


Hi Miguel Angel,

gtksharpglue.dll is a native (non .NET) library that is called by the
GTK# managed libs, you need it to be in the same directory where the
managed lib is being run from or in the PATH.

See that normally VS.NET copies the managed libraries to the directory
where it compiles your exe (different places for each configuration
like Debug e Release), but it doesn't know that it should copy the
native ones.

As you already know: native libs can't be referenced in the project.
One possible way to do it is to add the native dll files to the
project like if they were config/doc files, only be sure they are
tagged for the correct build action: source files are tagged to be
compiled, and normally all the other files are tagged to be copied,
that is what you need.

Hope it helps,

On 7/18/06, Miguel Angel Alvarez <ma.alvarez at ziv.es> wrote:
> Hi you all
>
> I am a newbie with C# and gtk#. I am trying to compile and execute some
> code using Visual Studio C# Express, but when I try to initialize the
> main class, I obtain the following exception "The type initializer for
> 'Gtk.Container' threw an exception."
>
> I have seen that the inner exception says "Unable to load DLL
> 'gtksharpglue-2'.
>
> I am trying to add gtksharpglue-2.dll as a reference, but although I
> find it under gtk#/bin, I am not able to add it. What am I doing wrong?
> Am I sending enough information?
>
> Thanks
>
> Miguel Ángel
>
> ----------------------------------------- PLEASE NOTE -------------------------------------------
> This message, along with any attachments, may be confidential or legally privileged.
> It is intended only for the named person(s), who is/are the only authorized recipients.
> If this message has reached you in error, kindly destroy it without review and notify the sender immediately.
> Thank you for your help.
> µSysCom uses virus scanning software but excludes any liability for viruses contained in any attachment.
>
> ------------------------------------ ROGAMOS LEA ESTE TEXTO -------------------------------
> Este mensaje y sus anexos pueden contener información confidencial y/o con derecho legal.
> Está dirigido únicamente a la/s persona/s o entidad/es reseñadas como único destinatario autorizado.
> Si este mensaje le hubiera llegado por error, por favor elimínelo sin revisarlo ni reenviarlo y notifíquelo inmediatamente al remitente. Gracias por su colaboración.
> µSysCom utiliza software antivirus, pero no se hace responsable de los virus contenidos en los ficheros anexos.
> _______________________________________________
> Gtk-sharp-list maillist  -  Gtk-sharp-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/gtk-sharp-list
>


-- 
Rafael "Monoman" Teixeira
---------------------------------------
"The reasonable man adapts himself to the world; the unreasonable one
persists in trying to adapt the world to himself. Therefore all
progress depends on the unreasonable man." George Bernard Shaw


More information about the Gtk-sharp-list mailing list