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
Problem with Compiling C on Tiger cleansing_flame High Level Programming 4 03-04-2008 05:01 PM
Compiling a C program ooploo High Level Programming 3 10-06-2006 03:35 AM
Problem compiling program rochitsharma High Level Programming 28 07-23-2006 05:56 PM
Compiling a program Minnesota Red High Level Programming 7 06-16-2003 01:35 PM
Error Compiling C program Vivek High Level Programming 3 10-25-2001 08:13 AM

Reply
 
Submit Tools LinkBack Thread Tools Display Modes
  #1  
Old 01-28-2008
cleansing_flame's Avatar
Registered User
 

Join Date: Nov 2007
Location: NYC
Posts: 37
help on compiling a C program on Tiger

here is the very simple bob.c:

main()
{
printf("hello");
}

i use tiger and i use the command:
gcc bob.c

and the end result:

bob.c: In function ‘main’:
bob.c:3: warning: incompatible implicit declaration of built-in function /‘printf’


any help appreciated, i'm just starting up, hopefully thanks in advance
Reply With Quote
Forum Sponsor
  #2  
Old 01-28-2008
Registered User
 

Join Date: May 2006
Posts: 45
add the header file stdio.h in the beginning of the program :
#include <stdio.h>
Reply With Quote
  #3  
Old 01-29-2008
cleansing_flame's Avatar
Registered User
 

Join Date: Nov 2007
Location: NYC
Posts: 37
that got rid of the errors, but now the printf() function does not output
Reply With Quote
  #4  
Old 01-29-2008
Registered User
 

Join Date: Oct 2007
Location: USA
Posts: 567
Question

Do you mean the OS X Tiger...state the platform you are compiling on? What header files are you including besides <stdio.h> and what libs are you compiling with? There might be issues with the printf() definition between the header files and libs you are compiling with.
Reply With Quote
  #5  
Old 01-29-2008
cleansing_flame's Avatar
Registered User
 

Join Date: Nov 2007
Location: NYC
Posts: 37
i downloaded xcode thats it
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools
Display Modes




All times are GMT -7. The time now is 04:20 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