View the Most Wanted LQ Wiki articles.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 01-11-2007, 05:43 AM   #1
LQ Newbie
Registered: Jan 2007
Posts: 1

Rep: Reputation: 0
Arrow undefined reference to main () ?.

I am using armlinux tool. when I compile my main program, it shows the following error.

what is he actual problem.

In function `_start':
: undefined reference to `main'
collect2: ld returned 1 exit status
make: *** [athdev] Error 1


whats my problem .
Old 01-11-2007, 06:09 AM   #2
Registered: Oct 2006
Location: Santa Barbara, C.A.
Distribution: Mood dependent
Posts: 117

Rep: Reputation: 15
Do you have your compiler and libraries installed?
Old 01-11-2007, 06:49 AM   #3
Senior Member
Registered: Dec 2003
Location: Trondheim, Norway
Distribution: Debian and Ubuntu
Posts: 1,195

Rep: Reputation: 265Reputation: 265Reputation: 265

To me it looks like the program lacks a function called main.
Old 01-11-2007, 06:29 PM   #4
Ynot Irucrem
Registered: Apr 2005
Location: Perth, Western Australia
Distribution: Debian
Posts: 233

Rep: Reputation: 30
my main program
So this is something you wrote yourself? If so can you post the code? Otherwise, email the developer of that software.


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
Getting undefined reference to main error?? Programming 14 07-29-2011 08:28 AM
Undefined reference, why? george_mercury Programming 4 05-07-2009 12:15 AM
Gcj undefined reference main (hello world program) SW-ANIKY Programming 1 12-16-2006 10:08 AM
undefined reference to main cjbrockwell Programming 3 09-06-2006 05:09 PM
emacs 77: undefined reference to `main' creznedmick Programming 2 09-16-2003 07:46 PM

All times are GMT -5. The time now is 08:05 AM.

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