When I try to compile my GTK# app, the compiler says:
jbailo@linux:~/mono> mcs buttons.cs -r gtk-sharp.dll -r glib-sharp.dll -r -o
buttons.exe
error CS2001: Source file 'buttons.exe' could not be opened
Compilation failed: 1 error(s), 0 warnings
jbailo@linux:~/mono> mcs buttons.cs -r gtk-sharp.dll -r glib-sharp.dll -o
buttons.exe
buttons.cs(8) error CS0246: The namespace `System.Drawing ' can not be found
(missing assembly reference?)
Try using -r:System.Drawin g
Compilation failed: 1 error(s), 0 warnings
jbailo@linux:~/mono> mcs buttons.cs -r gtk-sharp.dll -r glib-sharp.dll -o
buttons.exe -r:System.Drawin g
error CS0006: Cannot find assembly `System.Drawing '
Log:
Compilation failed: 1 error(s), 0 warnings
jbailo@linux:~/mono>
here's the source code:
//buttons.cs
namespace GtkSharpTutoria l {
using Gtk;
using GtkSharp;
using System;
using System.Drawing;
public class buttons
{
/* Create a new hbox with an image and a label packed into it
* and return the box. */
static Widget xpm_label_box(s tring xpm_filename, string label_text )
{
/* create box for image and label */
HBox box = new HBox(false, 0);
box.BorderWidth = 2;
/* Now on to the image stuff */
Gtk.Image image = new Gtk.Image(xpm_f ilename);
/* Create a label for the button */
Label label = new Label (label_text);
/* Pack the image and label into the box */
box.PackStart( image, false, false, 3);
box.PackStart( label, false, false, 3);
image.Show();
label.Show();
return box;
}
/* Our usual callback function */
static void callback( object obj, EventArgs args)
{
Console.WriteLi ne("Hello again - cool button was pressed");
}
/* another callback */
static void delete_event(ob ject obj, DeleteEventArgs args)
{
Application.Qui t();
}
public static void Main(string[] args)
{
Application.Ini t();
/* Create a new window */
Window window = new Window ("Pixmap'd Buttons!");
/* It's a good idea to do this for all windows */
window.DeleteEv ent += new DeleteEventHand ler(delete_even t);
/* Sets the border width of the window */
window.BorderWi dth = 10;
/* Create a new button */
Button button = new Button();
/* Connect the "clicked" signal of the button on your callback */
button.Clicked += new EventHandler(ca llback);
/* This calls our box creating function */
Widget box = xpm_label_box(" info.xpm", "cool button");
/* Pack and show all our widgets */
box.Show();
button.Add(box) ;
button.Show();
window.Add(butt on);
window.ShowAll( );
/* Rest in gtk_main and wait for the fun to begin! */
Application.Run ();
}
}
}
--
W '04 <:> Open 2 3426
Hi Bailo, a.k.a. James Coburn's Grey Helmet Hair,
Re: Your:
error CS2001: Source file 'buttons.exe' could not be opened
What errors come up when you do a:
mcs buttons.cs -o buttons.exe ?
Look up the documentation for the stuff that pops up
it should tell you what .LIB files you need to link with
as well as what include files you'll need.
You might have to provide the path to the .LIB file too.
Jeff Relf wrote: Hi Bailo, a.k.a. James Coburn's Grey Helmet Hair, Re: Your: error CS2001: Source file 'buttons.exe' could not be opened
What errors come up when you do a: mcs buttons.cs -o buttons.exe ?
Look up the documentation for the stuff that pops up it should tell you what .LIB files you need to link with as well as what include files you'll need.
You might have to provide the path to the .LIB file too.
Ignore that first one. It was malformed.
--
W '04 <:> Open This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: James Coburn's Grey Helmet Hair |
last post by:
When I try to compile my GTK# app, the compiler says:
jbailo@linux:~/mono> mcs buttons.cs -r gtk-sharp.dll -r glib-sharp.dll -r -o
buttons.exe
error CS2001: Source file 'buttons.exe' could not be opened
Compilation failed: 1 error(s), 0 warnings
jbailo@linux:~/mono> mcs buttons.cs -r gtk-sharp.dll -r glib-sharp.dll -o
buttons.exe
buttons.cs(8) error CS0246: The namespace `System.Drawing' can not be found
(missing assembly reference?)
|
by: Stuart Norris |
last post by:
Dear Group,
I have a question about the result from ‘graphics.MeasureString' when
using a mono-spaced font. Firstly I assume that Courier New font is
mono-spaced, ie each character takes up the same space when drawn on
the screen.
I am working on a program that requires displaying data in fixed width
font. I assumed that with ‘graphics.MeasureString' I could calculate
the width of the string when drawn in a specified font.
|
by: Paul C. |
last post by:
I am new to programming in C# using Mono (mcs). What .dll does this
"InitializeComponent()" method reside in?
Code:
// mcs web.cs -lib:C:\Program~1\Mono-1.0\lib -r:System.Data
-r:System.Web -r:System.Web.Services -r:System.Drawing
//
using System;
|
by: Poewood |
last post by:
Okay here are four classes for a pocket pc program: Input, fpositional,
ComboBoxArray and TextBoxArray. The "input" class is the form. I use the
fpositional class to handle most of the functions for the objects on the
form, in addition the The objects are created in the fpositional class and
affixed to the Input form through the fpositional constructor which takes the
form as an argument. The ComboBox and TextBox Array classes hold the...
|
by: StriderBob |
last post by:
Situation :
FormX is mdi child form containing 2 ListViews
ListView1 contains a list of table names and 4 sub items with data about
each table.
ListView2 contains a list of the columns on each table and 11 sub items with
data about each column.
When a Row in ListView1 is selected the Data in ListVies2 is loaded to show
the correct data. Initially the first row in ListView1 is selected in FormX
load
| |
by: frankgerlach |
last post by:
When trying to run the sample web services of the mono distribution
(file /opt/mono-1.1.10/lib/xsp/test/1.1/webservice/TestService.asmx), I
get the following error message in my web browser:
Compilation Error
Description: Error compiling a resource required to service this
request. Review your source file and modify it to fix this error.
Error message: (0,0) : error CS0006: Cannot find assembly `System.Data'
(0,0) : error CS0006:...
|
by: Sanghyeon Seo |
last post by:
I took some time to write this HOWTO:
http://sparcs.kaist.ac.kr/~tinuviel/fepy/howto/simplehttpserver-ironpython-mono-howto.html
IronPython seems to get much less interest than it deserves. This
howto shows how to setup IronPython to use with Mono on Linux and how
to rebuild IronPython from source. It also discusses various patches
to current problems. It also shows that IronPython can run
SimpleHTTPServer today, not a trivial...
|
by: Twig |
last post by:
Hi,
Can I use strictly for C# development without missing anything from MS?
Twig
|
by: Nikola Skoric |
last post by:
I ran in Mono a program developed on .NET Framework 2.0 and it ran OK
until I tried to desirialize a object. There the program died abruptly
dumping this:
System.ArgumentOutOfRangeException: Value -8590321990885400808 is
outside the valid range .
Parameter name: ticks
at System.DateTime..ctor (Int64 ticks)
at
System.Runtime.Serialization.Formatters.Binary.ObjectReader.ReadPrimitiv
|
by: Hitchkas |
last post by:
I have a very beginner and fundamental question regarding porting and
running C# programs in Linux. As a background I am a total idiot when
it comes to Linux but somehow managed to install Ubuntu 7.04 Feisty
Fawn and Monodevelop 0.12 on a machine. So far so good, however I
cannot compile and run a simplest winform application. Basically,
"System.Windows.Forms" is not recognized and cannot even do a
MessageBox.Show.
So, my basic...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
| |
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
| |
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |