LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 03-30-2004, 11:59 AM   #1
Vyeperman
Member
 
Registered: Jul 2003
Location: California
Distribution: Gentoo 1.4
Posts: 108

Rep: Reputation: 15
Weird error on gcc but not g++||solved


Alright I get this weird error when trying compile my C code ( not to be mistaken for C++ ) and I get this error.
Code:
root@Lavyethen mine # gcc C3ST1.C
/tmp/cca9lk7P.o(.eh_frame+0x11): undefined reference to `__gxx_personality_v0'
collect2: ld returned 1 exit status
But then when I do g++ it works...
Code:
root@Lavyethen mine # g++ C3ST1.C
root@Lavyethen mine #
It made the executable and everything what is up with this?
Here is the code on that file if that helps... (simple simple program)
Code:
/* Filename: C3ST2.C
   Compute sales tax and display it with an appropriate message */
                                                                                
#include <stdio.h>
                                                                                
int main()
{
   float sale, tax;
   float tax_rate = .08;   /* Sales tax percentage */
                                                                                
   /* Determine the amount of the sale */
   sale = 22.54;
                                                                                
   /* Compute the sales tax */
   tax = sale * tax_rate;
                                                                                
   /* Print the results */
   printf("The sales tax is:");
   printf("%f", tax);
                                                                                
   return 0;
}

Last edited by Vyeperman; 03-30-2004 at 03:06 PM.
 
Old 03-30-2004, 12:23 PM   #2
kev82
Senior Member
 
Registered: Apr 2003
Location: Lancaster, England
Distribution: Debian Etch, OS X 10.4
Posts: 1,263

Rep: Reputation: 51
unix is case sensitive, .C is recognised as a c++ file, rename to C3ST1.c and you should be ok
 
Old 03-30-2004, 03:05 PM   #3
Vyeperman
Member
 
Registered: Jul 2003
Location: California
Distribution: Gentoo 1.4
Posts: 108

Original Poster
Rep: Reputation: 15
thanks a gob.
 
Old 03-30-2004, 06:50 PM   #4
Chris Weimer
Member
 
Registered: Jan 2004
Location: NYC
Distribution: Fedora XFCE
Posts: 91

Rep: Reputation: Disabled
I'm surprised g++ didn't warn you about stdio.h, but I guess since you're using gcc it doesn't matter now.
 
  


Reply



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
in gcc compiler error: parse error before string constsnt cynthia_thomas Linux - Networking 1 10-20-2005 01:29 AM
Weird X error AMMullan Red Hat 3 11-22-2003 08:11 PM
Weird error demonfi Linux - Newbie 1 08-16-2003 01:35 PM
Weird problem encountered while trying to install GCC sykopath Linux - Software 3 08-08-2003 03:08 AM
Weird error help! please Devboy Linux - Software 9 08-01-2003 08:56 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 06:05 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration