Forums

Compiling GTK# example on XP

General discussion about Cobra. Releases and general news will also be posted here.
Feel free to ask questions or just say "Hello".

Compiling GTK# example on XP

Postby Weave » Thu Apr 29, 2010 6:14 am

Hello,

I'm new to .NET/Mono so please be patient.

I can't figure out how to compile the GTK# example on Windows XP, I've tried numerous different combinations of command line switches but I'm clearly not getting it.

I then thought I'd cracked it by adding these statements to the start of the example:
Code: Select all
use Gtk from "gtk-sharp"
use Gdk from "gdk-sharp"
use GLib from "glib-sharp"
use Atk from "atk-sharp"
and then calling the compiler like this: cobra -c -lib:"C:\Program Files\Mono-2.6.4\lib\mono\gtk-sharp-2.0" C:\Path\To\Gtk.cobra

This appears to compile OK and I get an *.exe but it wont run.

I have mono/GTK# installed and this is the path to gtk-sharp.dll: C:\Program Files\Mono-2.6.4\lib\mono\gtk-sharp-2.0

If somebody could give me the correct command line I'd appreciate it.

Is there a document that gives a full explanation of the switches?
I've done cobra -h but I'm obviously not getting something.
Weave
 
Posts: 2

Re: Compiling GTK# example on XP

Postby Charles » Thu Apr 29, 2010 9:56 am

I have only compiled GTK# on Mac, but I have some ideas anyway.

(1) When you run the .exe, you may be actually running it on .NET which might not have GTK# DLLs installed (since I see you are getting GTK# from a Mono directory). Try "mono myprog.exe" to force it run via Mono.

(2) I notice with .NET & Mono, that the -lib directory really doesn't "stick" all the way through to the .exe. If you are able to compile, but not run, you may want to try copying the DLLs into the same directory as your program and see if that works. If it does, you can continue like that or take a stab at installing the .exe's into the GAC.

(3) If you poke around the web for "GTK# windows" or "GTK# windows mono" or "GTK# windows gmcs" you will find others with similar struggles that they eventually figure out.

But at this point, I think (1) is your solution.

Let us know how it goes.
Charles
 
Posts: 2515
Location: Los Angeles, CA


Return to Discussion

Who is online

Users browsing this forum: No registered users and 25 guests