C++Talk.NET Forum Index C++Talk.NET
C++ language newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Q: can't find C++ symbols if gcc linking with Sun C++ librar

 
Post new topic   Reply to topic    C++Talk.NET Forum Index -> C++ language (comp.lang.c++)
View previous topic :: View next topic  
Author Message
Albert
Guest





PostPosted: Sat Sep 27, 2003 1:57 am    Post subject: Q: can't find C++ symbols if gcc linking with Sun C++ librar Reply with quote



Dear C++ guru,
I need to compile C++ server which used
a lot of GNU G++ specific codes AND one Sun C++ library
g++ -c a_i.cc i=1,...n

then
g++ a_i.o ... -lSUNLIB_other -lGNULIB_other(s) -o exe

Undefined symbol:
Cl::Cl(void)
Cl::set(int)
Cl::~Cl(void)
....

So, seems that Sun C++ and G++ differently resolved classes .....
Is it true? Or there are some options here?

What can I do? I can't recompile SUNLIB_other under g++, can't
GNULIB_other under SUN CC.

Best regards, Albert.
P.S.: Could you also send your answers to [email]brecht_11 (AT) yahoo (DOT) com[/email] too
Back to top
Kevin Goodsell
Guest





PostPosted: Sat Sep 27, 2003 5:09 am    Post subject: Re: Q: can't find C++ symbols if gcc linking with Sun C++ li Reply with quote



Albert wrote:

Quote:
Dear C++ guru,
I need to compile C++ server which used
a lot of GNU G++ specific codes AND one Sun C++ library
g++ -c a_i.cc i=1,...n

then
g++ a_i.o ... -lSUNLIB_other -lGNULIB_other(s) -o exe

Undefined symbol:
Cl::Cl(void)
Cl::set(int)
Cl::~Cl(void)
....

So, seems that Sun C++ and G++ differently resolved classes .....
Is it true? Or there are some options here?

What can I do? I can't recompile SUNLIB_other under g++, can't
GNULIB_other under SUN CC.

Best regards, Albert.
P.S.: Could you also send your answers to [email]brecht_11 (AT) yahoo (DOT) com[/email] too

Your question is not about the C++ language, but about a particular
implementation and a particular library. You should probably ask in a
group that discusses the tools you are using.

http://www.slack.net/~shiva/welcome.txt
http://www.slack.net/~shiva/offtopic.txt

-Kevin
--
My email address is valid, but changes periodically.
To contact me please use the address from a recent posting.


Back to top
Ron Natalie
Guest





PostPosted: Sat Sep 27, 2003 2:40 pm    Post subject: Re: can't find C++ symbols if gcc linking with Sun C++ libra Reply with quote




"Albert" <brecht_11 (AT) yahoo (DOT) com> wrote


Quote:
So, seems that Sun C++ and G++ differently resolved classes .....
Is it true? Or there are some options here?

Looks like it. It's quite common, even for machines that have a common C API
that allows mixing and matching modules from different compilers to have disparate
C++ linkage schemes. The standard doesn't address this at all, it's up for the
individual platforms and compiler implementers to come up with their own API
standards if they want to assure interoperability of this nature.

You will get more detailed information for your particular platform/implementations
if you ask in groups or forums targeted for these applications. (Both Sun and GCC
have their own newsgroups).




Back to top
Albert
Guest





PostPosted: Mon Sep 29, 2003 11:58 am    Post subject: Re: Q: can't find C++ symbols if gcc linking with Sun C++ li Reply with quote

Quote:
I need to compile C++ server which used
a lot of GNU G++ specific codes AND one Sun C++ library
g++ -c a_i.cc i=1,...n
g++ a_i.o ... -lSUNLIB_other -lGNULIB_other(s) -o exe
Undefined symbol:
Cl::Cl(void)
Cl::set(int)
Cl::~Cl(void)
So, seems that Sun C++ and G++ differently resolved classes .....
Is it true? Or there are some options here?
What can I do? I can't recompile SUNLIB_other under g++, can't
GNULIB_other under SUN CC.

Your question is not about the C++ language, but about a particular
implementation and a particular library. You should probably ask in a
group that discusses the tools you are using.

May be you are right, but anyhow this is question
about C++ , true? This is potencially important for all who create
big C++ projects. Again, may be I can solve this problem by using some
compilers option? Albert.

Back to top
Mike Wahler
Guest





PostPosted: Mon Sep 29, 2003 4:03 pm    Post subject: Re: [OT, welcome msg, redir, links] Q: can't find C++ symbol Reply with quote


"Albert" <brecht_11 (AT) yahoo (DOT) com> wrote

Quote:
I need to compile C++ server which used
a lot of GNU G++ specific codes AND one Sun C++ library
g++ -c a_i.cc i=1,...n
g++ a_i.o ... -lSUNLIB_other -lGNULIB_other(s) -o exe
Undefined symbol:
Cl::Cl(void)
Cl::set(int)
Cl::~Cl(void)
So, seems that Sun C++ and G++ differently resolved classes .....
Is it true? Or there are some options here?
What can I do? I can't recompile SUNLIB_other under g++, can't
GNULIB_other under SUN CC.


Please note here what Kevin has (accurately) told you:

Quote:
Your question is not about the C++ language,


Quote:
but about a particular
implementation and a particular library. You should probably ask in a
group that discusses the tools you are using.

May be you are right,

He is.

Quote:
but anyhow this is question
about C++ , true?


False.

You've just effectively said:

"Maybe you're right that my question is not about the C++ language,
but this is a question about C++, right?"

Huh? :-)

Please see:
http://www.slack.net/~shiva/welcome.txt
... which tell what is the nature and topic of this group.


Quote:
This is potencially important for all who create
big C++ projects.

Sure, knowledge of ones tools and how they may or may
not be used together is certainly important. The
only programmer tool discussed here is the C++ language.
Not compilers. Not libraries. etc. etc.


Quote:
Again, may be I can solve this problem by using some
compilers option?

Perhaps. Check with your compiler vendor, or as Kevin
suggests, find a group which discusses it. Here are
a couple of links which should help you locate such a
group (if one exists):
www.groups.google.com
www.usenet.org

-Mike



Back to top
Display posts from previous:   
Post new topic   Reply to topic    C++Talk.NET Forum Index -> C++ language (comp.lang.c++) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.