Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C++ > STL undefined symbols strikes again!

Reply
Thread Tools

STL undefined symbols strikes again!

 
 
Vijay Bajwa
Guest
Posts: n/a
 
      02-13-2007
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<std::basic_ist ream<char,std::char_traits<char>
>,std::basic_string<char,std::char_traits<char>,st d::allocator<char>
>,std::char_traits<char> >(__type_0&,__type_1&,__type_2) ../../install/

liboaphapp.a(AppSender.o)
__type_1
std::copy<std::basic_string<char,std::char_traits< char>,std::allocator<char>
>*,std::basic_string<char,std::char_traits<char>,s td::allocator<char>
>*>(__type_0,__type_0,__type_1) liboaphdirect.a(OAPHInstitution.o)

void
std::vector<std::basic_string<char,std::char_trait s<char>,std::allocator<char>
>,std::allocator<std::basic_string<char,std::char_ traits<char>,std::allocator<char>
> >

>::__insert_aux(std::basic_string<char,std::char_t raits<char>,std::allocator<char>
>*,const

std::basic_string<char,std::char_traits<char>,std: :allocator<char> >&)
liboaphdirect.a(OAPHInstitution.o)
__rwstd::__rb_tree<std::basic_string<char,std::cha r_traits<char>,std::allocator<char>
>,std:air<const

std::basic_string<char,std::char_traits<char>,std: :allocator<char>
>,int>,__rwstd::__select1st<std:air<const

std::basic_string<char,std::char_traits<char>,std: :allocator<char>
>,int>,std::basic_string<char,std::char_traits<cha r>,std::allocator<char>
>
>,std::less<std::basic_string<char,std::char_trait s<char>,std::allocator<char>
> >,std::allocator<std:air<const

std::basic_string<char,std::char_traits<char>,std: :allocator<char>
>,int> > >::iterator

__rwstd::__rb_tree<std::basic_string<char,std::cha r_traits<char>,std::allocator<char>
>,std:air<const

std::basic_string<char,std::char_traits<char>,std: :allocator<char>
>,int>,__rwstd::__select1st<std:air<const

std::basic_string<char,std::char_traits<char>,std: :allocator<char>
>,int>,std::basic_string<char,std::char_traits<cha r>,std::allocator<char>
>
>,std::less<std::basic_string<char,std::char_trait s<char>,std::allocator<char>
> >,std::allocator<std:air<const

std::basic_string<char,std::char_traits<char>,std: :allocator<char>
>,int> > >::find(const

std::basic_string<char,std::char_traits<char>,std: :allocator<char>
>&)const ../../install/liboaphapp.a(AppSender.o)

ld: fatal: Symbol referencing errors. No output written to oaph

 
Reply With Quote
 
 
 
 
Ian Collins
Guest
Posts: n/a
 
      02-13-2007
Vijay Bajwa wrote:
> 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!!
>

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

--
Ian Collins.
 
Reply With Quote
 
 
 
 
peter koch
Guest
Posts: n/a
 
      02-13-2007
On 13 Feb., 23:25, "Vijay Bajwa" <(E-Mail Removed)> wrote:
> 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

 
Reply With Quote
 
Vijay Bajwa
Guest
Posts: n/a
 
      02-15-2007
On Feb 13, 5:31 pm, Ian Collins <(E-Mail Removed)> wrote:
> Vijay Bajwa wrote:
> > 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!!

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


 
Reply With Quote
 
Vijay Bajwa
Guest
Posts: n/a
 
      02-15-2007
On Feb 13, 5:35 pm, "peter koch" <(E-Mail Removed)> wrote:
> On 13 Feb., 23:25, "Vijay Bajwa" <(E-Mail Removed)> wrote:> 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


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

 
Reply With Quote
 
Ian Collins
Guest
Posts: n/a
 
      02-15-2007
Vijay Bajwa wrote:
> On Feb 13, 5:31 pm, Ian Collins <(E-Mail Removed)> wrote:
>
>>Vijay Bajwa wrote:
>>
>>>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!!

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

<OT>
As I said, you are using a very old compiler, these issues don't arise
with recent versions.
</OT>

--
Ian Collins.
 
Reply With Quote
 
Jerry Coffin
Guest
Posts: n/a
 
      02-16-2007
In article <(E-Mail Removed). com>,
http://www.velocityreviews.com/forums/(E-Mail Removed) says...

[ ... ]

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

--
Later,
Jerry.

The universe is a figment of its own imagination.
 
Reply With Quote
 
 
 
Reply

Thread Tools

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
yacc under cygwin - undefined symbols Christoph Kukulies C Programming 2 06-25-2006 09:17 PM
Using multiple classes results in undefined symbols Thierry Dussuet C++ 2 05-11-2005 11:52 AM
fotre8 gives undefined symbols while forte7 doesn't pervinder C++ 0 08-30-2004 10:30 AM
Undefined Symbols when building xerces on AIX 5.1 32 bit machine Stu XML 1 11-06-2003 02:42 PM
Undefined symbols: vtable for Foo r C++ 2 08-02-2003 08:18 PM



Advertisments