LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
Search this Thread
Old 03-09-2005, 02:45 AM   #1
Palamides
Member
 
Registered: Jan 2005
Posts: 104

Rep: Reputation: 15
C++ compile errors


hi

I am trying to compile a piece of code in c++ but I am getting these 2 errors whenever I try to make an executable after compiling w/out any errors:

Code:
/usr/lib/gcc-lib/i486-slackware-linux/3.3.4/../../../crt1.o(.text+0x18):In function `_start':
../sysdeps/i386/elf/start.S:115: undefined reference to `main'
collect2: ld returned 1 exit status
can anyone help me out please, i have no clue what that means. thanks
 
Old 03-09-2005, 07:28 AM   #2
YetAnotherDave
Member
 
Registered: Feb 2005
Posts: 94

Rep: Reputation: 17
It looks like you don't have a main() routine. Verify this by adding a main routine to one of your files:

Code:
int main()
{
    return 0;
}
If this gets rid of your link problem then your resulting executable may not actually do much - but that's a different issue.

- Dave
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
compile errors. DrunkenDisciple Linux - Software 3 11-29-2005 01:11 AM
c++ compile errors using g++ ttumelty Programming 5 09-08-2005 02:58 PM
compile errors davidleroux1 Programming 4 05-10-2005 11:03 PM
Ndiswrapper Compile Errors ne2007ber Linux - Software 1 01-09-2005 03:33 PM
Compile Errors userini Linux - Software 6 07-16-2003 09:22 AM


All times are GMT -5. The time now is 06:17 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration