Discussion:
[Gtk-sharp-list] Windows Linux compatibility
Alpha Page
2013-12-09 10:48:04 UTC
Permalink
Hello,

I've run a test application in Windows (just need to add a new environment
variable %MonoDir%\bin just after installation of Mono + GTK# : seems to be
a long running problem). No problem.

When trying to run on Linux (openSuse 13.10), mono tries to find
libglib-2.0-0.dll ,so libglib-2.0-0.so . libglib-2_0-0 package is
installed, but add libglib-2.0.so to usr/lib64 : mono can't find the file
because of this naming problem.
I know I can tweak by myself to point to this file, but it would be great
if Gtk# would be fully compatible with Linux and Windows.

Thanks in advance for your answer.
Bertrand Lorentz
2013-12-09 20:40:40 UTC
Permalink
Hi,
Post by Alpha Page
Hello,
I've run a test application in Windows (just need to add a new environment
variable %MonoDir%\bin just after installation of Mono + GTK# : seems to be
a long running problem). No problem.
When trying to run on Linux (openSuse 13.10), mono tries to find
libglib-2.0-0.dll ,so libglib-2.0-0.so . libglib-2_0-0 package is installed,
but add libglib-2.0.so to usr/lib64 : mono can't find the file because of
this naming problem.
I'm not sure I understand the problem on Linux:
The source code references libglib-2.0-0.dll, but mono uses the
.config file corresponding to the assembly (for example
glib-sharp.dll.config) to determine the name of the native library. On
my Ubuntu system, glib-sharp.dll.config contains this line, amongst
others:
<dllmap dll="libglib-2.0-0.dll" target="libglib-2.0.so.0"/>

Then, the native library is found the usual way on Linux. It's the
responsibility of the distro and packages to set up things correctly
so that last step works.

So I don't think Gtk# is doing anything wrong here, unless I'm missing
something.

--
Bertrand
Alpha Page
2013-12-13 10:22:21 UTC
Permalink
Sorry, my mistake !
My .exe folder was containing a glib-sharp.dll. After removing it, the app
was running.
I don't know if this could be considered as a bug.
- You can't share bin/Release folder between Windows and Linux: it won't
run on Linux because of the gtk dlls.
- If someone add glib-sharp.dll or another one, the application won't start.

I don't know if this is a gtk# problem or a mono one.
Elmar Haneke
2013-12-13 10:32:09 UTC
Permalink
Post by Alpha Page
- You can't share bin/Release folder between Windows and Linux: it
won't run on Linux because of the gtk dlls.
- If someone add glib-sharp.dll or another one, the application won't start.
There is no need to copy gtk dlls into "bin/Release" folder. Just leave
them in mono install location.

Elmar
Alpha Page
2013-12-13 18:28:55 UTC
Permalink
I understand that is just a deployment problem.
To bypass this trouble, I added all gtk-sharp.dlls to the gac (so CopyLocal
= false): but I get this error: "Could not load file or assembly
gtk-sharp.dll or one of its dependency".
I checked the gac : all are installed.
What I am missing ? Maybe gtk-sharp load other libraries dynamically and
causing the error ?

Thank you for your help.
Post by Elmar Haneke
Post by Alpha Page
- You can't share bin/Release folder between Windows and Linux: it
won't run on Linux because of the gtk dlls.
- If someone add glib-sharp.dll or another one, the application won't start.
There is no need to copy gtk dlls into "bin/Release" folder. Just leave
them in mono install location.
Elmar
_______________________________________________
http://lists.ximian.com/mailman/listinfo/gtk-sharp-list
Alpha Page
2013-12-13 18:30:17 UTC
Permalink
gac on windows
Post by Alpha Page
I understand that is just a deployment problem.
To bypass this trouble, I added all gtk-sharp.dlls to the gac (so
CopyLocal = false): but I get this error: "Could not load file or assembly
gtk-sharp.dll or one of its dependency".
I checked the gac : all are installed.
What I am missing ? Maybe gtk-sharp load other libraries dynamically and
causing the error ?
Thank you for your help.
Post by Elmar Haneke
Post by Alpha Page
- You can't share bin/Release folder between Windows and Linux: it
won't run on Linux because of the gtk dlls.
- If someone add glib-sharp.dll or another one, the application won't start.
There is no need to copy gtk dlls into "bin/Release" folder. Just leave
them in mono install location.
Elmar
_______________________________________________
http://lists.ximian.com/mailman/listinfo/gtk-sharp-list
Continue reading on narkive:
Loading...