Results 1 to 3 of 3
Hi all,
I am getting the error:
Undefined reference to main:
Please guide me how can i get rid of this.
Regards,
Mayank...
- 04-03-2008 #1Just Joined!
- Join Date
- Mar 2008
- Posts
- 7
Error in main
Hi all,
I am getting the error:
Undefined reference to main:
Please guide me how can i get rid of this.
Regards,
Mayank
- 04-03-2008 #2
Your sourcecode compiles fine because there are no syntactical errors.
But after that the linker tries to build a executable out of it and therefor needs to know some "start-position" where the work begins when your programme is started later. Per default this is a function called "main" and it seems yours is missing or the linker can't find it.
(I assumed you want to build an executable.)
- 04-04-2008 #3Linux Guru
- Join Date
- Nov 2007
- Location
- Córdoba (Spain)
- Posts
- 1,513


Reply With Quote
