其中用monodevelop編寫好的程式(像gtk#的程式)
常常會要用到-pkg:gtk-sharp或-r gkt-sharp(之類的參數)編譯
可是在monodevelop下都會發生錯誤~~~~多半就是說需要用那些package
不知道要怎麼在monodevelop中加入參數到預設的編譯指令中呢?
因為我若直接用文字模式編又是可以~~~所以我確定我的程式沒有問題
麻煩各位了
ps.不知學園裡有沒有大大有在寫,若有,可以留一下mail交流一下,要不然中文的文件真少的情況下,學起來真累,第一次K mail-list真是英文太爛了啦!><"
我的code如下:
- 代碼: 選擇全部
/*
* date: 2005/07/15
* author:huki (SongKai Huang)
* mail:huki.tw@gmail.com
* filename:test1.cs
* mcs -pkg:glade-sharp -pkg:gtk-sharp -resource:icon.png test1.cs
*/
using Gtk;
using Glade;
using System;
using GtkSharp;
public class test1
{
[Widget] Image image1;
[Widget] Fixed fixed1;
public test1 ()
{
Application.Init();
Glade.XML gxml = new Glade.XML ("./test1.glade", "window1", null);
gxml.Autoconnect (this);
image1.Pixbuf = new Gdk.Pixbuf (null, "icon.png");
//Console.WriteLine (image1.Pixbuf.Height + " " + image1.Pixbuf.Width);
Application.Run();
}
public static void Main (string [] args)
{
new test1();
}
public void on_window1_delete_event (object o, DeleteEventArgs args)
{
Application.Quit ();
}
}
在monodevelop編譯的錯誤(Build Output)如下:
- 代碼: 選擇全部
Building Project: test1 Configuration: Debug
Performing main compilation...
Try using -pkg:gtk-sharp
Try using -pkg:glade-sharp
Try using -pkg:gtk-sharp
Compilation failed: 6 error(s), 0 warnings
/mnt/win_d/Linux/mono/test1/test1.cs(15) error CS0246: Cannot find type 'Image'
/mnt/win_d/Linux/mono/test1/test1.cs(16) error CS0246: Cannot find type 'Fixed'
/mnt/win_d/Linux/mono/test1/test1.cs(35) error CS0246: Cannot find type 'DeleteEventArgs'
/mnt/win_d/Linux/mono/test1/test1.cs(8) error CS0246: The namespace `Gtk' can not be found (missing assembly reference?)
/mnt/win_d/Linux/mono/test1/test1.cs(9) error CS0246: The namespace `Glade' can not be found (missing assembly reference?)
/mnt/win_d/Linux/mono/test1/test1.cs(11) error CS0246: The namespace `GtkSharp' can not be found (missing assembly reference?)
Build complete -- 6 errors, 0 warnings