[antlr-interest] problems on linking

Loring Craymer Loring.G.Craymer at jpl.nasa.gov
Sat Feb 5 15:51:56 PST 2005


This sort of thing is _very_ platform dependent.  What OS and version are
you running on?  Solaris, for example, requires that you do some Byzantine
things to get template runtime code into libraries.

--Loring

> -----Original Message-----
> From: antlr-interest-bounces at antlr.org [mailto:antlr-interest-
> bounces at antlr.org] On Behalf Of Sheng Wang
> Sent: Saturday, February 05, 2005 3:34 PM
> To: antlr-interest at antlr.org
> Subject: [antlr-interest] problems on linking
> 
> Hi,
> 
> I run into some problems when I try to link the
> compiled files that generated by ANTLR.  I am using
> "Cpp" option. GCC version is 3.4.2.
> 
> g++ -g -o myparser *.o /usr/lib/libantlr.a
> /usr/lib/libantlr.a(BitSet.o)(.text+0xfa): In function
> `antlr::BitSet::BitSet(unsigned int)':
> : undefined reference to
> `std::__default_alloc_template<true, 0>::_S_force_new'
> /usr/lib/libantlr.a(BitSet.o)(.text+0x127): In
> function `antlr::BitSet::BitSet(unsigned int)':
> : undefined reference to
> `std::__default_alloc_template<true,
> 0>::_S_freelist_index(unsigned int)'
> /usr/lib/libantlr.a(BitSet.o)(.text+0x134): In
> function `antlr::BitSet::BitSet(unsigned int)':
> ....
> 
> Any insights?
> 
> Thanks a lot!
> 
> Sheng
> 
> 
> 
> __________________________________
> Do you Yahoo!?
> Yahoo! Mail - Easier than ever with enhanced search. Learn more.
> http://info.mail.yahoo.com/mail_250



More information about the antlr-interest mailing list