LinuxAnswers - the LQ Linux tutorial section.
Go Back > Forums > Non-*NIX Forums > Programming
User Name
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.


  Search this Thread
Old 05-12-2004, 11:25 PM   #1
Registered: Sep 2003
Location: South Carolina
Distribution: Ubuntu, CentOS, BT4, Debian
Posts: 132

Rep: Reputation: 15
GCC g++ error using classes

Dose anyone know what this means??? I sure don't

g++ VideoClassTypeburnett6.cpp
/usr/lib/gcc-lib/i586-mandrake-linux-gnu/3.3.1/../../../crt1.o(.text+0x18): In function `_start':
../sysdeps/i386/elf/start.S:98: undefined reference to `main'
collect2: ld returned 1 exit status
Thanks in advance,
Old 05-13-2004, 03:21 AM   #2
Senior Member
Registered: Nov 2000
Location: Seattle, WA USA
Distribution: Ubuntu @ Home, RHEL @ Work
Posts: 3,892
Blog Entries: 1

Rep: Reputation: 66
It means that you don't have a main function in VideoClassTypeburnett6.cpp. At least that is my best guess looking at the message.

Usually when you compile a project at least one of the functions has a main somewhere which gets the ball rolling so to speak. It isn't that each cpp file needs a main, but when it links it and tries to make an executable from it the compiler needs to know where to start.

Read your compiler manual. It'll tell you all sorts of nice things like how to just build object files. In this case you probably want g++ -c VideoClassTypeburnett6.cpp though I would also recommend you use the -Wall and -pedantic option.
Old 05-13-2004, 11:01 AM   #3
Registered: Sep 2003
Location: South Carolina
Distribution: Ubuntu, CentOS, BT4, Debian
Posts: 132

Original Poster
Rep: Reputation: 15
Thanks jtshaw


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
in gcc compiler error: parse error before string constsnt cynthia_thomas Linux - Networking 1 10-20-2005 01:29 AM
OOP (PHP) classes and extended classes ldp Programming 3 03-05-2005 11:45 AM
Error - GCC rapidmaniac Linux - Software 6 04-29-2004 06:15 PM
gcc 33 error rahul_jain_9684 Linux From Scratch 1 07-30-2003 11:15 AM
gcc linking error. ugenn Linux - Software 0 01-22-2003 11:18 PM

All times are GMT -5. The time now is 12:22 PM.

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