473,378 Members | 1,482 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

undefined reference to `__gxx_personality_sj0'

Hi,
I'm seeing this problem when i try to compile my code.
I did a lot of googling before posting here.

I read that my Library Path may not be set right. but, I get
this error even after setting my library path correctly.

Just to confirm, what should the Library Path include to
solve this error.

Is there any other area that i should be looking into to
solve this.

Thanks in Advance,
Sunil Kumar K
Nov 14 '05 #1
5 16476

"Sunil Kumar" <su*****@gmail.com> wrote in message
news:5f**************************@posting.google.c om...
Hi,
I'm seeing this problem when i try to compile my code.
I did a lot of googling before posting here.

I read that my Library Path may not be set right. but, I get
this error even after setting my library path correctly.

Just to confirm, what should the Library Path include to
solve this error.

Is there any other area that i should be looking into to
solve this.

Thanks in Advance,
Sunil Kumar K

When you include C++ code, you must link against your C++ libraries,
preferably by using the C++ compiler to drive the link. This makes it Off
Topic in c.l.c.
You may be using a C compiler which turns your code over to a C++ compiler
when you use a source file name like xxx.C or xxx.cpp. If you can't figure
out where that happened, you could examine your .o files to find out where
the C++ library is called.
Nov 14 '05 #2

"Sunil Kumar" <su*****@gmail.com> wrote in message
news:5f**************************@posting.google.c om...
Hi,
I'm seeing this problem when i try to compile my code.
I did a lot of googling before posting here.

I read that my Library Path may not be set right. but, I get
this error even after setting my library path correctly.

Just to confirm, what should the Library Path include to
solve this error.

Is there any other area that i should be looking into to
solve this.


I use dev-c++ with gcc on windows xp
and when I try to compile a c soure
where the filename has a capitalised
extension (eg filename.C)
I get a similar undefined reference
__gxx_personality_??

When I change the extension to lowercase
all is well ...strange but true ...
Nov 14 '05 #3
"code_wrong" <ta*@tac.ouch.co.uk> wrote in message news:<10****************@nnrp-t71-02.news.clara.net>...
"Sunil Kumar" <su*****@gmail.com> wrote in message
news:5f**************************@posting.google.c om...
Hi,
I'm seeing this problem when i try to compile my code.
I did a lot of googling before posting here.

I read that my Library Path may not be set right. but, I get
this error even after setting my library path correctly.

Just to confirm, what should the Library Path include to
solve this error.

Is there any other area that i should be looking into to
solve this.


I use dev-c++ with gcc on windows xp
and when I try to compile a c soure
where the filename has a capitalised
extension (eg filename.C)
I get a similar undefined reference
__gxx_personality_??

When I change the extension to lowercase
all is well ...strange but true ...


Yes, this happened to me also, on DJGPP. I was getting message like

e:/djgpp/tmp/ccwOnjlv.o(.eh_frame+0x11):PTR.C: undefined reference to
`___gxx_personality_v0'
collect2: ld returned 1 exit status

The problem is the name of the program: PTR.C (uppercase extension)
Nov 14 '05 #4
Hi there,

I use dev-c++ with gcc on windows xp
and when I try to compile a c soure
where the filename has a capitalised
extension (eg filename.C)
I get a similar undefined reference
__gxx_personality_??

When I change the extension to lowercase
all is well ...strange but true ...


Not so strange: If you do not specify the language,
gcc (and djgpp, for that matter) try to determine the
language from the file extension.
..C is not considered to be a file extension for C source
by gcc.
C source often does not lead to successfully compiled
and linked programs when passed to a C++ compiler,
for example...
Read the compiler documentation.

Tell gcc that you want C89 (with or w/o amendment),
gnu89 or the C99 subset gcc is able to handle by now
(or the respective gnu99 version), then you are fine
with any extension.
Cheers,
Michael

Nov 14 '05 #5

"Michael Mair" <ma********************@ians.uni-stuttgart.de> wrote in
message news:cg**********@infosun2.rus.uni-stuttgart.de...
Hi there,

I use dev-c++ with gcc on windows xp
and when I try to compile a c soure
where the filename has a capitalised
extension (eg filename.C)
I get a similar undefined reference
__gxx_personality_??

When I change the extension to lowercase
all is well ...strange but true ...


Not so strange: If you do not specify the language,
gcc (and djgpp, for that matter) try to determine the
language from the file extension.
.C is not considered to be a file extension for C source
by gcc.
C source often does not lead to successfully compiled
and linked programs when passed to a C++ compiler,
for example...
Read the compiler documentation.

Tell gcc that you want C89 (with or w/o amendment),
gnu89 or the C99 subset gcc is able to handle by now
(or the respective gnu99 version), then you are fine
with any extension.


aha Interesting .. thanks for info
Nov 14 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: RU | last post by:
Hi, I am working on a porting project to port C/C++ application from unixware C++, AT&T Standard components to g++ with STL on Linux. This application has been working properly on...
1
by: Codemutant | last post by:
**** Post for FREE via your newsreader at post.usenet.com **** I just cannot find what is undefined in this code.
1
by: Dom | last post by:
I'm new to c++. Just started learning it 24 hours ago. Am running into a compile problem. Please, no one waste the effort telling me to google it. I've been researching it for quite a while with no...
1
by: Andre Janssen | last post by:
Hi.... I tried to compile the following src with this command: "g++ -Wall -o bla alsaswitch.cpp". The src is an example src of xosd package. #include <xosd.h> int main (int argc, char...
3
by: Michael Sgier | last post by:
Hi i get thousands of messages like below. How shall i resolve that? Thanks Mcihael Release/src/Utility/RawImage.o: In function `CMaskImage::CMaskImage(int, int, char const*)':...
5
by: druberego | last post by:
I read google and tried to find the solution myself. YES I do know that you can get undefined references if you: a) forget to implement the code for a prototype/header file item, or b) you forget...
3
by: prakash.mirji | last post by:
Hello, I am getting below mention linker error when I tried to link my class test.C I use below command to compile test.C /usr/bin/g++ -g -fpic -fvisibility=default -D_POSIX_SOURCE...
2
by: zqiang320 | last post by:
Hello: I execute make ,then get error: $ make Making all in libsbml/src make: Entering directory `/home/internet/mydoc/test_pj/libsbml/src' ........ /bin/sh ./libtool --tag=CC --mode=link...
3
by: tvnaidu | last post by:
I compiled tinyxml files (.cpp files) and when I am linking to create final exe in Linux, I am getting lot of errors saying "undefiend reference" to "operator new" and "delete", any idea?. ...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.