The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > High Level Programming
Google UNIX.COM


High Level Programming Post questions about C, C++, Java, SQL, and other programming languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Fatal Error sarwan High Level Programming 1 05-10-2006 07:21 AM
Glance Fatal Error newbie07 Shell Programming and Scripting 4 05-09-2006 10:15 PM
Purify-SGI Fatal Error avadhani UNIX for Advanced & Expert Users 2 11-28-2005 01:27 AM
ld: fatal error ppass High Level Programming 1 01-07-2005 09:32 AM
Fatal error in disk jav_v UNIX for Advanced & Expert Users 1 08-19-2002 09:51 AM

Reply
 
Submit Tools LinkBack Thread Tools Display Modes
  #1  
Old 10-31-2006
Registered User
 

Join Date: Oct 2006
Posts: 1
Exclamation ld: fatal error

i am trying to compile my program using a makefile and i keep getting this message:

Undefined first referenced
symbol in file
main
/usr/local/lib/gcc-lib/sparc-sun-solaris2.9/3.3/crt1.o
ld: fatal: Symbol referencing errors. No output written to prog5
collect2: ld returned 1 exit status
*** Error code 1
make: Fatal error: Command failed for target 'prog5'


this is driving me crazy!!!!
Reply With Quote
Forum Sponsor
  #2  
Old 10-31-2006
blowtorch's Avatar
Supporter
 
Join Date: Dec 2004
Location: Singapore
Posts: 2,326
Can you post your code? Do you have a 'main' function in your program?
Reply With Quote
  #3  
Old 11-01-2006
Registered User
 

Join Date: Aug 2005
Location: Saskatchewan
Posts: 979
All executable C programs must have this function:
Code:
int main(int argc, char *argv[])
{
  printf("Program begins here\n");
  return(0);
}
main() is called when the program begins; when main returns, the program ends.
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools
Display Modes




All times are GMT -7. The time now is 07:26 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008. All Rights Reserved.Ad Management by RedTyger Visit The Complex Event Processing Blog

Content Relevant URLs by vBSEO 3.2.0