The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

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

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 01-28-2008
cleansing_flame's Avatar
cleansing_flame cleansing_flame is offline
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
  #2 (permalink)  
Old 01-29-2008
ThobiasVakayil ThobiasVakayil is offline
Registered User
  
 

Join Date: May 2006
Posts: 64
add the header file stdio.h in the beginning of the program :
#include <stdio.h>
  #3 (permalink)  
Old 01-29-2008
cleansing_flame's Avatar
cleansing_flame cleansing_flame is offline
Registered User
  
 

Join Date: Nov 2007
Location: NYC
Posts: 37
that got rid of the errors, but now the printf() function does not output
  #4 (permalink)  
Old 01-29-2008
shamrock shamrock is offline Forum Advisor  
Registered User
  
 

Join Date: Oct 2007
Location: USA
Posts: 750
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.
  #5 (permalink)  
Old 01-29-2008
cleansing_flame's Avatar
cleansing_flame cleansing_flame is offline
Registered User
  
 

Join Date: Nov 2007
Location: NYC
Posts: 37
i downloaded xcode thats it
Sponsored Links
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 07:46 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0