tags:

views:

621

answers:

4

I know it sounds stupid but:

I've found this application written on Mono and it is open source.

While peeking at the source code I've found this two "using" directive that stoped me:

using Gdk;

using Mono.Unix;

I guess they're Mono specific libraries.

So, it is possible to run Mono under Windows? ( perhaps Visual Studio express edition ? )

I'm trying to learn C#

I see there is a Windows branch of the app, but it is empty.

BTW: Is it Mono thought for cross platform in first place?

EDIT

I've downloaded/installed and run the sample code

using Mono.Unix;

class X { static void Main () { System.Console.Write("OK");} }

And the answer to my own question is:

x.cs(1,12): error CS0234: The type or namespace name `Unix' does not exist 
in the namespace `Mono'. Are you missing an assembly reference?
Compilation failed: 1 error(s), 0 warnings

No, it doesn't work :(

+3  A: 

Yes, you can install mono under windows. There is an experimental installer.

See: http://mono-project.com/Mono:Windows

That page also has information on the gtk libs.

cyberconte
Looking at it rigth now. Do you know if it covers Mono.Unix namespace ( which is pretty much the source of my question ? )
John
+2  A: 

Of course you can run mono under windows:

http://www.go-mono.com/mono-downloads/download.html

Blake Pettersson
+1  A: 

Mono on windows guide

I am not sure you will be able to use code using the Mono.Unix namespace, but generally if you are creating cross platform code, you shouldn't have to.

Gnome Do linux port. For a learning project however, I might suggest starting with code that is actually cross platform, or develop on Linux for now. Tackling cross platform issues and possibly an incomplete port will just complicate the learning process.

So, I suppose in summary to your initial question. Yes, you can run Mono on Windows, but it is possible to write platform specific code, which the example application you have chosen has indeed done. The link I provided above is a port to make that code work on Windows. Without porting ( changing the platform specific code ), that program will not compile on windows.

Serapth
I am not. This is an existing source code I want to learn. See the link in my post.
John
Ah, missed the link. Well frankly no, that looks to be platform specific code. There is however a port in progress, which theoretically works on Windows. I will edit link into my post above.
Serapth
A port of ... do? Yeap I mention it in the question too. :) I tried to install a linux on my machine using a VirtualBox, but since virtual machines does not access hardware I will be missing visual effects ( am I right? ) plus, I don't have a separate machine and quite frankly don't feel like getting into Linux env. Not that I don't think it is great ( when everything is working already ) but I value my time, and don't want to spend too much time on that. ( But to be honest the last time I attempt to install Linux was 7 yrs ago, things must be easier now , right? right? )
John
Generally yes, VMs have pretty limited 3D support, so FX may be minimal. Linux has come a long way, a very long way, to the point you install a CD and walk away for 20 minutes, or you can even install it to a USB stick if your computer supports booting from USB. That said, for an initial learn to program C#/Mono app, I would suggest starting with something less problematic.
Serapth
I agree. :) I happen to always find this "C# for Accountants" type of tutorials, that are pretty boring because I already know how to program. Actually I can understand most of the C# I read. So I want to go for the next step, write some my self, but after I downloaded VS-C# express, I didn't knew what to do next. So, I said to my self. Find a open source C# application. But none of those I've found are simple enough, until this. Which after all was not that simple.
John
Try XNA. There are tons of tutorials for learning C# and XNA side by side and game/graphics programming is a ton more fun then most Accountant programming... well, unless you are really into your number crunching.
Serapth
A: 

The Gdk is a cross-platform library for low-level windowing system stuff, and the code is using .NET binding to Gdk. It is available for windows (as a part of Gtk# package or in Mono installer).

Mono.Unix is a mono library that provides access to unix services (syscalls, stdlib). I do not think that Mono.Unix is available for windows, but Mono.Posix might be available.

dmitry_vk
Mmhh maybe through cygwin?...:-S Naahh I don't even know what am I saying
John