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 04: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
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
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 (permalink)  
Old 01-28-2008
Registered User
 

Join Date: May 2006
Posts: 43
add the header file stdio.h in the beginning of the program :
#include <stdio.h>
Reply With Quote
  #3 (permalink)  
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 (permalink)  
Old 01-29-2008
Registered User
 

Join Date: Oct 2007
Location: USA
Posts: 477
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 (permalink)  
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 UNIX.COM
Reply

Thread Tools
Display Modes




All times are GMT -7. The time now is 06:40 PM.


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

Content Relevant URLs by vBSEO 3.2.0