Fedora Linux Support Community & Resources Center

Go Back   FedoraForum.org > Fedora 17/18 > Using Fedora
FedoraForum Search

Forgot Password? Join Us!

Using Fedora General support for current versions. Ask questions about Fedora and it's software that do not belong in any other forum.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 22nd October 2007, 12:12 PM
Daniel114 Offline
Registered User
 
Join Date: Mar 2006
Posts: 107
C for Dummies help

Hi there,

I'm trying to learn 'C' using the afore mentioned book, however I'm having trouble with the very first activity (its gonna be one long book)

I type...

#include <stdio.h>

int main()
{
printf("Goodbye, cruel world!\n");
return(0);
}

then as it says, type..

gcc GOODBYE.C -o goodbye

only everytime I get..

/local/.tmp/cc23a8S4.o(.eh_frame+0x11): undefined reference to `__gxx_personality_v0'
collect2: ld returned 1 exit status

I'm sure its very simple, but like I say, I'm incredibbly new to this and slightly dishevelled that I can't even progress past this

any ideas would be much appreciated

cheers

Dan
Reply With Quote
  #2  
Old 22nd October 2007, 12:18 PM
markkuk Offline
Registered User
 
Join Date: Apr 2005
Location: Finland
Posts: 5,075
The suffix .C makes the compiler think that the file is a C++ program. Rename the source file to "goodbye.c".
Reply With Quote
  #3  
Old 22nd October 2007, 12:26 PM
Daniel114 Offline
Registered User
 
Join Date: Mar 2006
Posts: 107
Thanks so much for that, tried it and it seems to have got the job done
Reply With Quote
  #4  
Old 22nd October 2007, 01:22 PM
stevea's Avatar
stevea Offline
Registered User
 
Join Date: Apr 2006
Location: Ohio, USA
Posts: 8,346
Or use: gcc -x c GOODBYE.C -o goodbye
to override the suffix indicator.
Reply With Quote
Reply

Tags
dummies

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Drive Clone For Dummies Rdwksw Using Fedora 3 1st August 2007 07:34 AM
SELinux for dummies abeb Security and Privacy 6 26th January 2007 09:16 AM
ALSA for dummies? Tantalus90 Using Fedora 9 9th July 2005 05:04 PM
rsync for dummies mvollmer Using Fedora 2 22nd April 2005 04:13 PM


Current GMT-time: 00:39 (Thursday, 20-06-2013)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat