473,396 Members | 2,038 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Error Compiling

Hey Guys!
Im Compiling a simple program is the command promt. I have set all the
paths needed to run the compiler. But when I use csc myprogram.cs, it says
that the program does not have an entry point defined. Can someone please
help me solve this problem?
Thanks
Nov 15 '05 #1
3 1441
Has it got a main function?

"Seelan Rajagopal" <t-******@microsoft.com.NO_SPAM> wrote in message
news:#B*************@TK2MSFTNGP11.phx.gbl...
Hey Guys!
Im Compiling a simple program is the command promt. I have set all the
paths needed to run the compiler. But when I use csc myprogram.cs, it says
that the program does not have an entry point defined. Can someone please
help me solve this problem?
Thanks

Nov 15 '05 #2
Seelan Rajagopal <t-******@microsoft.com.NO_SPAM> wrote:
Im Compiling a simple program is the command promt. I have set all the
paths needed to run the compiler. But when I use csc myprogram.cs, it says
that the program does not have an entry point defined. Can someone please
help me solve this problem?


You need to have a class with one of the following methods:

static void Main()
static void Main(string[] args)
static int Main()
static int Main(string[] args)

Or you could compile your code as a library, using the /t:library
compiler option.

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
Nov 15 '05 #3
Hi,

Perhaps you are missing Main method:
[STAThread]

static void Main()

{

// here goes the code - starting point

}
--
Miha Markic - RightHand .NET consulting & software development
miha at rthand com

"Seelan Rajagopal" <t-******@microsoft.com.NO_SPAM> wrote in message
news:%2***************@TK2MSFTNGP11.phx.gbl...
Hey Guys!
Im Compiling a simple program is the command promt. I have set all the
paths needed to run the compiler. But when I use csc myprogram.cs, it says
that the program does not have an entry point defined. Can someone please
help me solve this problem?
Thanks

Nov 15 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Matt | last post by:
Just out of the blue all of my code has given a 'Could not instantiate the resource processor.' error on compiling. This apparently means your installation of VS .Net has lost the plot. So I've...
6
by: bmwrob | last post by:
I’m very new in C++ programming and am trying to make a decoder tool just for the purpose of learning. I started my project in VC++ 6.0, but after a change of PC, I continued my programming in VS...
2
by: Qiao Yun | last post by:
I used vc++.net (visual studio .net ) to open a project which can work well in vc++6.0. I succeeded in compiling the project in vc++.net in release mode . But when I tried to compile the project...
0
by: Herman Jones | last post by:
I'm getting the following error when I build a Class Library project: Embedding manifest... Project : error PRJ0002 : Error result 1 returned from 'C:\WINDOWS\system32\cmd.exe'. It happens with...
2
by: teddybyte | last post by:
my script below is: #include "stdafx.h" int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, ...
2
by: f rom | last post by:
----- Forwarded Message ---- From: Josiah Carlson <jcarlson@uci.edu> To: f rom <etaoinbe@yahoo.com>; wxpython-users@lists.wxwidgets.org Sent: Monday, December 4, 2006 10:03:28 PM Subject: Re: ...
1
by: sahilrekhi | last post by:
Hi i am working on a graphical user interface deisgn programme. when i compile the file i i get the following output with the mentioned errors: 1>------ Rebuild All started: Project: guiq,...
1
by: SQACPP | last post by:
I have an error when compiling a simple form project... I just start a new Form project and add a new PictureBox in a form(or anything that generate the .resx file) After that when compiling I...
0
by: dami.gupta | last post by:
I am building a chm file using sandcastle and am following instructions on https://blogs.msdn.com/sandcastle/archive/2006/07/29/682398.aspx I am following all the commands which are...
6
by: JR | last post by:
The code below compiles and runs perfectly in Windows XP Pro, Using MS VS 2005. If I compile with g++ (cygwin) using the following command line: g++ -pedantic -Weffc++ -Wall -Wctor-dtor-privacy ...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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...
0
Oralloy
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,...
0
jinu1996
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...
0
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...
0
agi2029
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,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.