Discussion:
[Gtk-sharp-list] System.DllNotFoundException: libgobject-2.0-0.dll
Sascha Manns
2017-01-25 18:41:29 UTC
Permalink
Hello List,

actually my projects build without any errors, but if i'm starting the
exe, i'm getting on Linux:


{System.TypeInitializationException: The type initializer for
'Gtk.Application' threw an exception. --->
System.TypeInitializationException: The type initializer for
'GLib.GType' threw an exception. ---> System.DllNotFoundException:
libgobject-2.0-0.dll
at (wrapper managed-to-native) GLib.GType:g_type_init ()
at GLib.GType..cctor () [0x00192] in <8e24f684f2f1470bb8b16a3873bd8c0b>:0
--- End of inner exception stack trace ---
at Gtk.Application..cctor () [0x00000] in
<4437277c17f0449d84c5fa29ad7e26f3>:0
--- End of inner exception stack trace ---
at PublicanCreators.Program.Main () [0x00001] in
/home/sascha/RiderProjects/PublicanCreators/src/PublicanCreators/Program.cs:26
}

It looks like the mapping from libgobject-2.0.0.dll to
libgobject-2.0.0.so doesn't work.

The libs are available there:

* /usr/lib/i386-linux-gnu/libgobject-2.0.so.0
* /usr/lib/i386-linux-gnu/libgobject-2.0.so.0.5000.2
* /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
* /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.5000.2

The gtk-sharp.dll.config from my integrated NuGet package
"gtk-sharp.Linux.3.14.3.14.7" contains:

<configuration> <dllmap dll="libglib-2.0-0.dll"
target="libglib-2.0.so.0"/> <dllmap dll="libgobject-2.0-0.dll"
target="libgobject-2.0.so.0"/> <dllmap dll="libatk-1.0-0.dll"
target="libatk-1.0.so.0"/> <dllmap dll="libgtk-3-0.dll"
target="libgtk-3.so.0"/> </configuration>

So the mapping should work.

Has anyone seen that error and knows how to fix them?

Greetings
Sascha
--
Sascha Manns
***@mailbox.org <mailto:***@mailbox.org>
GPG: 0x168428cdb1f20ab1
<http://pgpkey.org/pks/lookup?op=vindex&search=0x168428cdb1f20ab1&fingerprint=on>
jabber:***@jabber.org <jabber:***@jabber.org>


Maifeldstraße 10
56727 Mayen
mobile: +49-1573-9242730
home: +49-2651-4014045
https://saigkill.github.io

Twitter <https://twitter.com/saigkill> Facebook
<https://www.facebook.com/sascha.manns> LinkedIn
<https://de.linkedin.com/in/saigkill> Skype <skype:schurik0815?call>
Github <https://github.com/saigkill> Xing
<https://www.xing.com/profile/Sascha_Manns4>
Baltasar García Perez-Schofield
2017-01-26 10:11:47 UTC
Permalink
Hi, Sascha,

I've sent you your project fixed (at least, in the Glade/Gtk.Builder
aspect) privately.

The problems you had were that:
a) The package to add was not Gtk# -3 - linux, it was Gtk#3, the first one
appearing in the list when typing "gtk".
b) You have to put the build action for gui.glade to "embedd"
c) There were a lot of mismatchs between the names you put in the glade
file for signals, and the names for the event handlers in the TestForm1.cs.

-- Baltasar
Sascha Manns
2017-01-26 11:55:34 UTC
Permalink
Hello Baltasar,
Post by Baltasar García Perez-Schofield
Hi, Sascha,
I've sent you your project fixed (at least, in the Glade/Gtk.Builder
aspect) privately.
a) The package to add was not Gtk# -3 - linux, it was Gtk#3, the first
one appearing in the list when typing "gtk".
b) You have to put the build action for gui.glade to "embedd"
c) There were a lot of mismatchs between the names you put in the
glade file for signals, and the names for the event handlers in the
TestForm1.cs.
Thank you very much Baltasar. It looks very good :-)

Greetings
Sascha
--
<https://saigkill.github.io/>

Sascha Manns
***@mailbox.org <mailto:***@mailbox.org>
GPG: 0x168428cdb1f20ab1
<http://pgpkey.org/pks/lookup?op=vindex&search=0x168428cdb1f20ab1&fingerprint=on>
jabber:***@jabber.org <jabber:***@jabber.org>


Maifeldstraße 10
56727 Mayen
mobile: +49-1573-9242730
home: +49-2651-4014045
https://saigkill.github.io

Twitter <https://twitter.com/saigkill> Facebook
<https://www.facebook.com/sascha.manns> LinkedIn
<https://de.linkedin.com/in/saigkill> Skype <skype:schurik0815?call>
Github <https://github.com/saigkill> Xing
<https://www.xing.com/profile/Sascha_Manns4>
Loading...