Fedora Linux Support Community & Resources Center
Sections ›› Home | Forums | Guidelines | Forum Help | Fedora FAQ | Fedora News 

Go Back   FedoraForum.org > Fedora Support > Software

Software Help on software problems.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 2006-07-28, 07:26 AM CDT
eschi Offline
Registered User
 
Join Date: Apr 2006
Posts: 76
monodevelop problem

Hello.

I successfully installed monodevelop from the mono repo:

[mono]
name=Mono for fedora-5-x86_64 (stable)
baseurl=http://go-mono.com/download-stable/fedora-5-x86_64/
enabled=1
gpgcheck=0


I can run run monodevelop and I also can build a smple console application in C#.

But when I try do build a simple Gnome# application, I get the errors:

Code:
[Task:File=/home/dirk/projects/test2/MyProgram.cs, Line=2, Column=1, Type=Error, Description=The type or namespace name `Gtk' could not be found. Are you missing a using directive or an assembly reference?(CS0246)
All references are in the project.

Can someone please help me. Do I need to set some enviroment variables, so the compiler knows where to search for the libraries?

I'm using Fedora Cor 5 on an AMD X2 3800+

Thanks in advance,
Dirk
Reply With Quote
  #2  
Old 2006-07-28, 10:38 PM CDT
Jman Offline
Registered User
 
Join Date: Mar 2004
Location: Minnesota, USA
Age: 23
Posts: 7,902
You possibly need to
Code:
yum install gtk-sharp2
or something, due to Gtk.

I'm working with Extras on a Fedora monodevelop package, hopefully that'll be better.
Reply With Quote
  #3  
Old 2006-07-29, 06:07 AM CDT
eschi Offline
Registered User
 
Join Date: Apr 2006
Posts: 76
Quote:
Originally Posted by Jman
You possibly need to
Code:
yum install gtk-sharp2
or something, due to Gtk.

I'm working with Extras on a Fedora monodevelop package, hopefully that'll be better.

My installed packages (from Novell) are:

Installed Packages
art-sharp2.x86_64 2.8.2-0.fedora5.novell installed
boo.noarch 0.7.0.1921-1.novell installed
bytefx-data-mysql.x86_64 1.1.13.8-0.novell installed
gconf-sharp2.x86_64 2.8.2-0.fedora5.novell installed
glade-sharp2.x86_64 2.8.2-0.fedora5.novell installed
glib-sharp2.x86_64 2.8.2-0.fedora5.novell installed
gnome-sharp2.x86_64 2.8.2-0.fedora5.novell installed
gnome-vfs-sharp2.x86_64 2.8.2-0.fedora5.novell installed
gtk-sharp2.x86_64 2.8.2-0.fedora5.novell installed
gtkhtml-sharp2.x86_64 2.8.2-0.fedora5.novell installed
gtksourceview-sharp2.noarch 0.10-3.novell installed
ikvm.noarch 1:0.22-0.novell installed
mono-core.x86_64 1.1.13.8-0.novell installed
mono-data.x86_64 1.1.13.8-0.novell installed
mono-data-oracle.x86_64 1.1.13.8-0.novell installed
mono-data-postgresql.x86_64 1.1.13.8-0.novell installed
mono-data-sqlite.x86_64 1.1.13.8-0.novell installed
mono-data-sybase.x86_64 1.1.13.8-0.novell installed
mono-nunit.x86_64 1.1.13.8-0.novell installed
mono-web.x86_64 1.1.13.8-0.novell installed
mono-winforms.x86_64 1.1.13.8-0.novell installed
monodevelop.noarch 0.9-2.novell installed
monodoc-core.noarch 1.1.13-1.novell installed


Any ideas?
Reply With Quote
  #4  
Old 2006-07-29, 02:43 PM CDT
LLS Offline
Registered User
 
Join Date: Sep 2004
Location: +37 -95
Posts: 497
I am trying to find some resolution on this myself only to run into many dead ends on forums around the web. I hate to see a good tool like this go to waste because there are so many dead ends on fixes. I too am getting a can't find gtk lib path errors and the one you have posted above. Will keep looking as it either works or it does not and I can not get anyone to say.
Reply With Quote
  #5  
Old 2006-07-29, 08:24 PM CDT
LLS Offline
Registered User
 
Join Date: Sep 2004
Location: +37 -95
Posts: 497
A little different error here now when using "test2.cs is your example code"
Code:
$ mcs -pkg:gtk-sharp test2.cs
test2.cs(9,5): error CS0246: The type or namespace name `MyWindow' could not be found. Are you missing a using directive or an assembly reference?
Compilation failed: 1 error(s), 0 warnings

Here is one that compiles and works with one warning using myWindow maybe it can give us a hint at what is wrong with the first code.
Code:
using System;
using Gtk;

class VBoxTester {
     
     static void Main ()
     {
          Application.Init ();
          Window myWindow = new Window ("VBox Widget");

          VBox myBox = new VBox (false, 4);
          
          //Add the box to a Window container
          myWindow.Add (myBox);
          myWindow.ShowAll ();
          Application.Run ();
     }

     static void AddButton (VBox box)
     {
          box.PackStart (new Button ("Button"), true, false, 0);
     }     
}
This one works a little better
Code:
using System;
using Gtk;

class WindowTester {
     static void Main ()
     {
          Application.Init ();
          Window myWindow = new Window ("This is a window");
          myWindow.DeleteEvent += OnDelete;
          myWindow.SetDefaultSize (200, 200);

          //Put a button in the Window
          Button button = new Button ("Click");
          myWindow.Add (button);
          myWindow.ShowAll ();
          Application.Run ();
     }

     static void OnDelete (object o, DeleteEventArgs e)
     {
          Application.Quit ();
     }     
}

Last edited by LLS; 2006-07-29 at 08:46 PM CDT.
Reply With Quote
  #6  
Old 2006-07-30, 11:24 AM CDT
eschi Offline
Registered User
 
Join Date: Apr 2006
Posts: 76
I compiled your example and get the following error:

mcs -pkg:gtk-sharp Main.cs
Package gtk-sharp was not found in the pkg-config search path.
Perhaps you should add the directory containing `gtk-sharp.pc'
to the PKG_CONFIG_PATH environment variable
No package 'gtk-sharp' found
error CS8027: Error running pkg-config. Check the above output.

A find for that file doesn't find the file: gtk-sharp.pc.

So, I'm really missing that one. But I thought everything is installed from the Novell repo.

Here is my PKG_CONFIG_PATH:

PKG_CONFIG_PATH=/usr/lib64/pkgconfig:/usr/lib/mono:$PKG_CONFIG_PATH
Reply With Quote
  #7  
Old 2006-07-30, 04:35 PM CDT
LLS Offline
Registered User
 
Join Date: Sep 2004
Location: +37 -95
Posts: 497
I just have the stock fc5 and fc6test2 mono not the Novell version but my config path is /usr/lib/mono so that looks correct and I have not set a $PKG_CONFIG_PATH.

This is what ships with fc5 and 6--
$ ls /usr/lib/mono
1.0 compat-1.0 dbus-sharp gac gtk-sharp
2.0 compat-2.0 evolution-sharp gmime-sharp gtk-sharp-2.0

yum search mono--
and this is what is installed--
mono-core.i386 1.1.16-1.1 installed
gsf-sharp.i386 0.8-1.1 installed
mono-data-sqlite.i386 1.1.16-1.1 installed
dbus-sharp.i386 0.63-4.fc6 installed
gtk-sharp.i386 1.0.10-6.1 installed
mono-web.i386 1.1.16-1.1 installed
cdda2wav.i386 8:2.01.01.0.a10-1.1 installed
gmime-sharp.i386 2.2.1-2.1 installed
libgdiplus.i386 1.1.16-1.1 installed
evolution-sharp.i386 0.11.1-5.1 installed
gtk-sharp2.i386 2.8.2-2.1 installed
mono-data.i386 1.1.16-1.1 installed
Reply With Quote
  #8  
Old 2006-07-31, 09:07 PM CDT
LLS Offline
Registered User
 
Join Date: Sep 2004
Location: +37 -95
Posts: 497
I have tried setting pkg_config_path and as mono_config and it does no good. I was able to compile this file example with two warns but it runs, with this -
Code:
mcs -pkg:gtk-sharp-2.0 -r:System.Drawing  box1.cs
all my my .pcs are in /usr/lib/pkgconfig but dlls are in /usr/lib/mono/. Works fine in fc5 but not so well in fc6t2.
http://www.mono-project.com/GtkSharp...ing_with_Boxes
Reply With Quote
  #9  
Old 2006-08-01, 10:29 AM CDT
eschi Offline
Registered User
 
Join Date: Apr 2006
Posts: 76
Hi. sorry for waiting so long for my reply.

When I do a mcs -pkg:gtk-sharp-2.0 -r:System.Drawing box1.cs at the console, it works fine. I get these three warnings:

box1.cs(18,29): warning CS0219: The variable `box1' is assigned but its value is never used
box1.cs(74,30): warning CS0219: The variable `misc' is assigned but its value is never used
box1.cs(62,29): warning CS0169: The private method `GtkSharpTutorial.fixedcontainer.exitbutton_event( object, Gtk.ButtonPressEventArgs)' is never used
Compilation succeeded - 3 warning(s)

So, do I understand you the right way, that you don't use monodevelop? Just only the comand line?
Reply With Quote
  #10  
Old 2006-08-01, 10:35 AM CDT
LLS Offline
Registered User
 
Join Date: Sep 2004
Location: +37 -95
Posts: 497
Yes, this is new to me so I am just learning about the utilities so then I would
Code:
mono box1.exe 1
or box1.exe 2 or box1.exe 3 and view the output.
Reply With Quote
  #11  
Old 2006-08-01, 10:39 AM CDT
eschi Offline
Registered User
 
Join Date: Apr 2006
Posts: 76
Hey, this was pretty fast;-)

Well,

mono box1.exe 1

worked well. The window with the buttons appear on the screen.
Reply With Quote
  #12  
Old 2006-11-04, 12:44 PM CST
raphtee Offline
Registered User
 
Join Date: Oct 2004
Location: Currently Washington D.C. Soon San Francsico
Age: 35
Posts: 21
You need to installl gtk-sharp2-devel via yum

raphtee
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
A Problem with Monodevelop and GTK# themistic Programming 2 2008-12-17 02:16 PM CST
Monodevelop starting problem in f9 True_Friend Software 0 2008-06-08 08:01 PM CDT
Monodevelop gtk-sharp2 problem ronin1982 Programming 4 2007-08-13 01:07 PM CDT
Problem starting monodevelop hvniekerk Software 5 2006-12-19 03:06 PM CST
problem with importing vs projects into monodevelop iamroot Software 0 2006-07-21 03:40 AM CDT

Automatic Translations (Powered by Powered by Google):
Afrikaans Albanian Arabic Belarusian Bulgarian Catalan Chinese Croatian Czech Danish Dutch English Estonian Filipino Finnish French Galician German Greek Hebrew Hindi Hungarian Icelandic Indonesian Italian Japanese Korean Latvian Lithuanian Macedonian Malay Maltese Norwegian Persian Polish Portuguese Romanian Russian Serbian Slovak Slovenian Spanish Swahili Swedish Taiwanese Thai Turkish Ukrainian Vietnamese Yiddish

All times are GMT -7. The time now is 04:02 PM CST.

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
Hosting provided by ThePlanet



All trademarks, and forum posts in this site are property of their respective owner(s).

FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact | Founding Members
Designed By Ewdison Then | Powered by vBulletin ©2000-2009, Jelsoft Enterprises Ltd.
FedoraForum is Powered by Open Source Projects and Products
Translated to other languages supported by vB Enterprise Translator