STL undefined symbols strikes again!

V

Vijay Bajwa

Once again, the FORTE 7.0 compiler on Sun screwed me. The error msgs
are incomprehensible. There is the familiar STL linkage problem,
libraries compile fine tho. it's only when I compile the main it gives
the undefined symbol. Appreciate any pointers!!

+++ making oaph
/xenv/Forte/sun4/7.0/5.8p4/prod/bin/CC -D_REENTRANT -g -Dsvr4 -DSVR4 -
DSUN -DCPLUSREL=7.0 -DOSREV=5.8p4 -DY2K -DCOMPILE_STYLE=CPP_COMPILE -
DTYPE_TOKEN_1=\"C\" -I../include -I/home/vb11258/OAD5.0/src/include -
I/xenv/xerces-c++/sun4/5.8p4/2.2.0/include -g -Bdynamic -zignore -
Qoption ld -t -mt -Bdynamic -lposix4 -o oaph dummy.o oaph.o
liboaphdirect.a ../../install/liboaphapp.a ../../install/
libencdec.a ../../install/libOAPHUtils.a -Bdynamic -L /xenv/xerces-c++/
sun4/5.8p4/2.2.0/lib -lxerces-c -L/home/vb11258/OAD5.0/lib -
loasdirect -L /xenv/mqi/sun4/5.x/5.3.0.5/lib -Bdynamic -lmqic -lmqmcs
-lmqmzse -limqb23as -limqc23as -lpthread
Undefined first referenced
symbol in file
__type_0&__rwstd::rw_extract_string said:
,std::basic_string<char,std::char_traits<char>,std::allocator<char>
,std::char_traits<char> >(__type_0&,__type_1&,__type_2) ../../install/
liboaphapp.a(AppSender.o)
__type_1
std::copy said:
*,std::basic_string<char,std::char_traits<char>,std::allocator<char>
*>(__type_0,__type_0,__type_1) liboaphdirect.a(OAPHInstitution.o)
void
std::vector said:
::__insert_aux(std::basic_string<char,std::char_traits<char>,std::allocator<char>
*,const
std::basic_string<char,std::char_traits<char>,std::allocator<char> >&)
liboaphdirect.a(OAPHInstitution.o)
__rwstd::__rb_tree said:
,std::pair<const
std::basic_string said:
,int>,__rwstd::__select1st<std::pair<const
std::basic_string said:
,int>,std::basic_string<char,std::char_traits<char>,std::allocator<char>
std::basic_string said:
,int> > >::iterator
__rwstd::__rb_tree said:
,std::pair<const
std::basic_string said:
,int>,__rwstd::__select1st<std::pair<const
std::basic_string said:
,int>,std::basic_string<char,std::char_traits<char>,std::allocator<char>
std::basic_string said:
,int> > >::find(const
std::basic_string said:
&)const ../../install/liboaphapp.a(AppSender.o)
ld: fatal: Symbol referencing errors. No output written to oaph
 
P

peter koch

Once again, the FORTE 7.0 compiler on Sun screwed me. The error msgs
are incomprehensible. There is the familiar STL linkage problem,
libraries compile fine tho. it's only when I compile the main it gives
the undefined symbol. Appreciate any pointers!!
[snip]
This all looks off-topic to me: ask in a newsgroup where you are on-
topic (a sun or a FORTE compiler newsgroup, I would guess).
It does not look that difficult, however: it looks as a missing
library that should be linked in. You should familiarise yourself with
the compiler and linker to an extent that these kind of problems
become solvable.

/Peter
 
V

Vijay Bajwa

You are using a very old compiler, but you might get help onhttp://forum.java.sun.com/forum.jspa?> forumID=850

The solution is to link in the object files found in: SunWS_cache/*/
*.o when building an archive library. The reason is that these object
files contain template instance code.
 
V

Vijay Bajwa

are incomprehensible. There is the familiar STL linkage problem,
libraries compile fine tho. it's only when I compile the main it gives
the undefined symbol. Appreciate any pointers!!

[snip]
This all looks off-topic to me: ask in a newsgroup where you are on-
topic (a sun or a FORTE compiler newsgroup, I would guess).
It does not look that difficult, however: it looks as a missing
library that should be linked in. You should familiarise yourself with
the compiler and linker to an extent that these kind of problems
become solvable.

/Peter

I agree I should have done more reasearch. But the topic does relate
to template instantiation and complexities arising therefrom, thus
relevant for this group. I posted the solution in reply to Ian's
reply.

Thanks,
Vijay
 
I

Ian Collins

Vijay said:
The solution is to link in the object files found in: SunWS_cache/*/
*.o when building an archive library. The reason is that these object
files contain template instance code.
<OT>
As I said, you are using a very old compiler, these issues don't arise
with recent versions.
</OT>
 
J

Jerry Coffin

[ ... ]
I agree I should have done more reasearch. But the topic does relate
to template instantiation and complexities arising therefrom, thus
relevant for this group. I posted the solution in reply to Ian's
reply.

I'm afraid I have to disagree -- this is about how to operate a specifi
compiler, not about C++ proper. As such, it is off-topic in both
newsgroups to which it's cross-posted.
 

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

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,053
Latest member
BrodieSola

Latest Threads

Top