Saturday, June 2, 2007

Mono and Fedora 7

Being a bit of a programmer means and having assignments that require me to submit code in C# mean that I have to have a viable and easy way to develop these applications. My software design teacher had once spoken to me about Mono which he referred to as .NET for Linux. On Windows I use either Visual Studio Codename Orcas or Visual C# Express Edition to develop applications for my own use and for projects for my online software design classes. The logical move for me was to download Mono, which I did. That in itself was a bit of a task but after using yum to download and install all the packages I could (I used the x86 Fedora 5 packages as they were the ones that were closest in match to my system) I went to load it. I found it placed nicely in the programming menu of the applications menu and loaded it up. It loaded ok and I tried my first "Hello World" program in Console C#. For a moment I was a little unsure as to weather it had actually worked or not but I found unlike on Windows where a console window is opened when a console application runs the output of the console app was down the bottem of the screen in the "output" panel. I though this was all very nice until I tried to read from the console.

Console.WriteLine(Console.ReadLine());

It did seem to let me enter in any response on the screen. If anyone knows how this is done or a way around it please leave a comment as it would be most appreciated.

My next problem arose from the Gtk 2.0 framework. While installing many of my Fedora 7 packages were more up to date than the ones in listed to be installed via yum and yum made it clear that there were conflicts between these packages so I just left it at that expecting things just to work with the newer packages I have. When I went and designed a Gtk 2.0 application and ran it, it would display two errors saying:

"The type or namespace name `Gtk' could not be found. Are you missing a using directive or an assembly reference?(CS0246)"

One error is for the using statement in the form events code and the other is for the using statement on the form designer code.

I went poking around in the references but couldn't see Gtk. I am at a little bit of a loss as to what to do here too. I suspect, knowing me, that I will find a fix for it soon, which I will post but it is a little bit annoying.

I have also installed and looked over Eclipse which will be useful when I do C++ coding which I might be taking up some more of sooner or latter. I seem to remember that packaged with Fedora Core 4 was Eclipse but with C# support (could have a faulty memory though). This version I have my hands on at the moment doesn't seem to support C# code.

1 comment:

Anonymous said...

Install the gtk-sharp packages