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

A

Albert

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 (e-mail address removed) too
 
K

Kevin Goodsell

Albert said:
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 (e-mail address removed) 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
 
R

Ron Natalie

Albert said:
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).
 
A

Albert

I need to compile C++ server which used
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.
 
M

Mike Wahler

Please note here what Kevin has (accurately) told you:
but about a particular

May be you are right,

He is.
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.

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.

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,581
Members
45,056
Latest member
GlycogenSupporthealth

Latest Threads

Top