This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

"undefined reference to" errors


Hi-

I'm getting a lot of link errors for some template code that compiled
fine with 1.0.3a  The code compiles when I'm optimizing, but not when
I'm debugging:

  % g++ -v -mpentiumpro -DMUST_BYTE_SWAP -D__NO_MATH_INLINES -imacros /d4m/frichard/BybRad/BYBTOOLS/include/BybRad-macros.h -funsigned-char -fno-exceptions  -o obj.i686lin/LDecoder_debug obj.i686lin/NBest.od obj.i686lin/Traceback.od obj.i686lin/PdfCbkMap.od obj.i686lin/Lattice.od obj.i686lin/NgramCache.od obj.i686lin/Ngram.od obj.i686lin/THash.od obj.i686lin/LatRecog.od obj.i686lin/LDecoder.od obj.i686lin/LParams.od obj.i686lin/HmmSet.od obj.i686lin/Grammar.od obj.i686lin/WordSpot.od obj.i686lin/TphSttLbl.od ../../lib/byblos/lib.i686lin/run_init.o  -L/d4m/frichard/BybRad/BYBTOOLS/lib.i686lin -L../../lib/NFCL/lib.i686lin -L../../lib/nemesis/lib.i686lin -L../../lib/byblos/lib.i686lin  -lNFCL_g -lnemesis_g -lbyblos_g -lm -lstdc++
  Reading specs from /d4mutl/bybrad.dev/lib/gcc-lib/i686-pc-linux-gnulibc1/egcs-2.91.54/specs
  gcc version egcs-2.91.54 19980819 (gcc2 ss-980609 experimental)
   /d4mutl/bybrad.dev/lib/gcc-lib/i686-pc-linux-gnulibc1/egcs-2.91.54/collect2 -m elf_i386 -dynamic-linker /lib/ld-linux.so.1 -o obj.i686lin/LDecoder_debug /usr/lib/crt1.o /usr/lib/crti.o /d4mutl/bybrad.dev/lib/gcc-lib/i686-pc-linux-gnulibc1/egcs-2.91.54/crtbegin.o -L/d4m/frichard/BybRad/BYBTOOLS/lib.i686lin -L../../lib/NFCL/lib.i686lin -L../../lib/nemesis/lib.i686lin -L../../lib/byblos/lib.i686lin -L/d4mutl/bybrad.dev/lib/gcc-lib/i686-pc-linux-gnulibc1/egcs-2.91.54 -L/d4mutl/bybrad.dev/i686-pc-linux-gnulibc1/lib -L/d4mutl/bybrad.dev/lib obj.i686lin/NBest.od obj.i686lin/Traceback.od obj.i686lin/PdfCbkMap.od obj.i686lin/Lattice.od obj.i686lin/NgramCache.od obj.i686lin/Ngram.od obj.i686lin/THash.od obj.i686lin/LatRecog.od obj.i686lin/LDecoder.od obj.i686lin/LParams.od obj.i686lin/HmmSet.od obj.i686lin/Grammar.od obj.i686lin/WordSpot.od obj.i686lin/TphSttLbl.od ../../lib/byblos/lib.i686lin/run_init.o -lNFCL_g -lnemesis_g -lbyblos_g -lstdc++ -lstdc++ -lm -lgcc -lc -lgcc /d4mutl/by!
brad.dev/lib/gcc-lib/i686-pc-linux-gnulibc1/egcs-2.91.54/crtend.o /usr/lib/crtn.o
  obj.i686lin/Lattice.od: In function `less<Network<WrdNode<Lattice::LatWrdNode, Lattice::LatWrdArc>, WrdArc<Lattice::LatWrdNode, Lattice::LatWrdArc> >::arc_iter>::operator()(Network<WrdNode<Lattice::LatWrdNode, Lattice::LatWrdArc>, WrdArc<Lattice::LatWrdNode, Lattice::LatWrdArc> >::arc_iter const &, Network<WrdNode<Lattice::LatWrdNode, Lattice::LatWrdArc>, WrdArc<Lattice::LatWrdNode, Lattice::LatWrdArc> >::arc_iter const &) const':
  obj.i686lin/Lattice.od(.gnu.linkonce.t.__cl__Ct4less1ZQ2t7Network2Zt7WrdNode2ZQ27Lattice10LatWrdNodeZQ27Lattice9LatWrdArcZt6WrdArc2ZQ27Lattice10LatWrdNodeZQ27Lattice9LatWrdArc8arc_iterRCQ2t7Network2Zt7WrdNode2ZQ27Lattice10LatWrdNodeZQ27Lattice9LatWrdArcZt6WrdArc2ZQ27Lattice10LatWrdNodeZQ27Lattice9LatWrdArc8arc_iterT1+0x39): undefined reference to `bool operator<<WrdNode<Lattice::LatWrdNode, Lattice::LatWrdArc>, WrdArc<Lattice::LatWrdNode, Lattice::LatWrdArc> >(Network<WrdNode<Lattice::LatWrdNode, Lattice::LatWrdArc>, WrdArc<Lattice::LatWrdNode, Lattice::LatWrdArc> >::arc_iter, Network<WrdNode<Lattice::LatWrdNode, Lattice::LatWrdArc>, WrdArc<Lattice::LatWrdNode, Lattice::LatWrdArc> >::arc_iter)'
  obj.i686lin/Lattice.od: In function `less<Network<TphNode<Lattice::LatWrdNode, Lattice::LatWrdArc, Lattice::LatTphNode, Lattice::LatTphArc>, TphArc<Lattice::LatWrdNode, Lattice::LatWrdArc, Lattice::LatTphNode, Lattice::LatTphArc> >::arc_iter>::operator()(Network<TphNode<Lattice::LatWrdNode, Lattice::LatWrdArc, Lattice::LatTphNode, Lattice::LatTphArc>, TphArc<Lattice::LatWrdNode, Lattice::LatWrdArc, Lattice::LatTphNode, Lattice::LatTphArc> >::arc_iter const &, Network<TphNode<Lattice::LatWrdNode, Lattice::LatWrdArc, Lattice::LatTphNode, Lattice::LatTphArc>, TphArc<Lattice::LatWrdNode, Lattice::LatWrdArc, Lattice::LatTphNode, Lattice::LatTphArc> >::arc_iter const &) const':
  obj.i686lin/Lattice.od(.gnu.linkonce.t.__cl__Ct4less1ZQ2t7Network2Zt7TphNode4ZQ27Lattice10LatWrdNodeZQ27Lattice9LatWrdArcZQ27Lattice10LatTphNodeZQ27Lattice9LatTphArcZt6TphArc4ZQ27Lattice10LatWrdNodeZQ27Lattice9LatWrdArcZQ27Lattice10LatTphNodeZQ27Lattice9LatTphArc8arc_iterRCQ2t7Network2Zt7TphNode4ZQ27Lattice10LatWrdNodeZQ27Lattice9LatWrdArcZQ27Lattice10LatTphNodeZQ27Lattice9LatTphArcZt6TphArc4ZQ27Lattice10LatWrdNodeZQ27Lattice9LatWrdArcZQ27Lattice10LatTphNodeZQ27Lattice9LatTphArc8arc_iterT1+0x39): undefined reference to `bool operator<<TphNode<Lattice::LatWrdNode, Lattice::LatWrdArc, Lattice::LatTphNode, Lattice::LatTphArc>, TphArc<Lattice::LatWrdNode, Lattice::LatWrdArc, Lattice::LatTphNode, Lattice::LatTphArc> >(Network<TphNode<Lattice::LatWrdNode, Lattice::LatWrdArc, Lattice::LatTphNode, Lattice::LatTphArc>, TphArc<Lattice::LatWrdNode, Lattice::LatWrdArc, Lattice::LatTphNode, Lattice::LatTphArc> >::arc_iter, Network<TphNode<Lattice::LatWrdNode, Lattice::LatWrdArc, Lattice:!
:LatTphNode, Lattice::LatTphArc>, TphArc<Lattice::LatWrdNode, Lattice::LatWrdArc, Lattice::LatTphNode, Lattice::LatTphArc> >::arc_iter)'
  obj.i686lin/LatRecog.od: In function `void PrintNet<WrdNode<Lattice::LatWrdNode, Lattice::LatWrdArc>, WrdArc<Lattice::LatWrdNode, Lattice::LatWrdArc>, WrdNet<Lattice::LatWrdNode, Lattice::LatWrdArc>::WrdLabel, Network<WrdNode<Lattice::LatWrdNode, Lattice::LatWrdArc>, WrdArc<Lattice::LatWrdNode, Lattice::LatWrdArc> >::ArcLabel>(ostream &, Network<WrdNode<Lattice::LatWrdNode, Lattice::LatWrdArc>, WrdArc<Lattice::LatWrdNode, Lattice::LatWrdArc> > const &, WrdNet<Lattice::LatWrdNode, Lattice::LatWrdArc>::WrdLabel, Network<WrdNode<Lattice::LatWrdNode, Lattice::LatWrdArc>, WrdArc<Lattice::LatWrdNode, Lattice::LatWrdArc> >::ArcLabel)':
  obj.i686lin/LatRecog.od(.void gnu.linkonce.t.PrintNet<WrdNode<Lattice::LatWrdNode, Lattice::LatWrdArc>, WrdArc<Lattice::LatWrdNode, Lattice::LatWrdArc>, WrdNet<Lattice::LatWrdNode, Lattice::LatWrdArc>::WrdLabel, Network<WrdNode<Lattice::LatWrdNode, Lattice::LatWrdArc>, WrdArc<Lattice::LatWrdNode, Lattice::LatWrdArc> >::ArcLabel>(ostream &, Network<WrdNode<Lattice::LatWrdNode, Lattice::LatWrdArc>, WrdArc<Lattice::LatWrdNode, Lattice::LatWrdArc> > const &, WrdNet<Lattice::LatWrdNode, Lattice::LatWrdArc>::WrdLabel, Network<WrdNode<Lattice::LatWrdNode, Lattice::LatWrdArc>, WrdArc<Lattice::LatWrdNode, Lattice::LatWrdArc> >::ArcLabel)+0x41): undefined reference to `void member_info<Lattice::LatWrdNode, Lattice::LatWrdArc>(ostream &, WrdNet<Lattice::LatWrdNode, Lattice::LatWrdArc>::WrdLabel const &)'
  obj.i686lin/LatRecog.od(.void gnu.linkonce.t.PrintNet<WrdNode<Lattice::LatWrdNode, Lattice::LatWrdArc>, WrdArc<Lattice::LatWrdNode, Lattice::LatWrdArc>, WrdNet<Lattice::LatWrdNode, Lattice::LatWrdArc>::WrdLabel, Network<WrdNode<Lattice::LatWrdNode, Lattice::LatWrdArc>, WrdArc<Lattice::LatWrdNode, Lattice::LatWrdArc> >::ArcLabel>(ostream &, Network<WrdNode<Lattice::LatWrdNode, Lattice::LatWrdArc>, WrdArc<Lattice::LatWrdNode, Lattice::LatWrdArc> > const &, WrdNet<Lattice::LatWrdNode, Lattice::LatWrdArc>::WrdLabel, Network<WrdNode<Lattice::LatWrdNode, Lattice::LatWrdArc>, WrdArc<Lattice::LatWrdNode, Lattice::LatWrdArc> >::ArcLabel)+0x73): undefined reference to `void member_info<WrdNode<Lattice::LatWrdNode, Lattice::LatWrdArc>, WrdArc<Lattice::LatWrdNode, Lattice::LatWrdArc> >(ostream &, Network<WrdNode<Lattice::LatWrdNode, Lattice::LatWrdArc>, WrdArc<Lattice::LatWrdNode, Lattice::LatWrdArc> >::ArcLabel const &)'
  obj.i686lin/LatRecog.od(.void gnu.linkonce.t.PrintNet<WrdNode<Lattice::LatWrdNode, Lattice::LatWrdArc>, WrdArc<Lattice::LatWrdNode, Lattice::LatWrdArc>, WrdNet<Lattice::LatWrdNode, Lattice::LatWrdArc>::WrdLabel, Network<WrdNode<Lattice::LatWrdNode, Lattice::LatWrdArc>, WrdArc<Lattice::LatWrdNode, Lattice::LatWrdArc> >::ArcLabel>(ostream &, Network<WrdNode<Lattice::LatWrdNode, Lattice::LatWrdArc>, WrdArc<Lattice::LatWrdNode, Lattice::LatWrdArc> > const &, WrdNet<Lattice::LatWrdNode, Lattice::LatWrdArc>::WrdLabel, Network<WrdNode<Lattice::LatWrdNode, Lattice::LatWrdArc>, WrdArc<Lattice::LatWrdNode, Lattice::LatWrdArc> >::ArcLabel)+0x144): undefined reference to `ostream & operator<<<Lattice::LatWrdNode, Lattice::LatWrdArc>(ostream &, WrdNet<Lattice::LatWrdNode, Lattice::LatWrdArc>::WrdLabel const &)'
  obj.i686lin/LatRecog.od(.void gnu.linkonce.t.PrintNet<WrdNode<Lattice::LatWrdNode, Lattice::LatWrdArc>, WrdArc<Lattice::LatWrdNode, Lattice::LatWrdArc>, WrdNet<Lattice::LatWrdNode, Lattice::LatWrdArc>::WrdLabel, Network<WrdNode<Lattice::LatWrdNode, Lattice::LatWrdArc>, WrdArc<Lattice::LatWrdNode, Lattice::LatWrdArc> >::ArcLabel>(ostream &, Network<WrdNode<Lattice::LatWrdNode, Lattice::LatWrdArc>, WrdArc<Lattice::LatWrdNode, Lattice::LatWrdArc> > const &, WrdNet<Lattice::LatWrdNode, Lattice::LatWrdArc>::WrdLabel, Network<WrdNode<Lattice::LatWrdNode, Lattice::LatWrdArc>, WrdArc<Lattice::LatWrdNode, Lattice::LatWrdArc> >::ArcLabel)+0x214): undefined reference to `ostream & operator<<<WrdNode<Lattice::LatWrdNode, Lattice::LatWrdArc>, WrdArc<Lattice::LatWrdNode, Lattice::LatWrdArc> >(ostream &, Network<WrdNode<Lattice::LatWrdNode, Lattice::LatWrdArc>, WrdArc<Lattice::LatWrdNode, Lattice::LatWrdArc> >::ArcLabel const &)'
  obj.i686lin/LatRecog.od: In function `void PrintNet<TphNode<Lattice::LatWrdNode, Lattice::LatWrdArc, Lattice::LatTphNode, Lattice::LatTphArc>, TphArc<Lattice::LatWrdNode, Lattice::LatWrdArc, Lattice::LatTphNode, Lattice::LatTphArc>, TphNet<Lattice::LatWrdNode, Lattice::LatWrdArc, Lattice::LatTphNode, Lattice::LatTphArc>::TphLabel, Network<TphNode<Lattice::LatWrdNode, Lattice::LatWrdArc, Lattice::LatTphNode, Lattice::LatTphArc>, TphArc<Lattice::LatWrdNode, Lattice::LatWrdArc, Lattice::LatTphNode, Lattice::LatTphArc> >::ArcLabel>(ostream &, Network<TphNode<Lattice::LatWrdNode, Lattice::LatWrdArc, Lattice::LatTphNode, Lattice::LatTphArc>, TphArc<Lattice::LatWrdNode, Lattice::LatWrdArc, Lattice::LatTphNode, Lattice::LatTphArc> > const &, TphNet<Lattice::LatWrdNode, Lattice::LatWrdArc, Lattice::LatTphNode, Lattice::LatTphArc>::TphLabel, Network<TphNode<Lattice::LatWrdNode, Lattice::LatWrdArc, Lattice::LatTphNode, Lattice::LatTphArc>, TphArc<Lattice::LatWrdNode, Lattice::LatWrdArc!
, Lattice::LatTphNode, Lattice::LatTphArc> >::ArcLabel)':
  obj.i686lin/LatRecog.od(.void gnu.linkonce.t.PrintNet<TphNode<Lattice::LatWrdNode, Lattice::LatWrdArc, Lattice::LatTphNode, Lattice::LatTphArc>, TphArc<Lattice::LatWrdNode, Lattice::LatWrdArc, Lattice::LatTphNode, Lattice::LatTphArc>, TphNet<Lattice::LatWrdNode, Lattice::LatWrdArc, Lattice::LatTphNode, Lattice::LatTphArc>::TphLabel, Network<TphNode<Lattice::LatWrdNode, Lattice::LatWrdArc, Lattice::LatTphNode, Lattice::LatTphArc>, TphArc<Lattice::LatWrdNode, Lattice::LatWrdArc, Lattice::LatTphNode, Lattice::LatTphArc> >::ArcLabel>(ostream &, Network<TphNode<Lattice::LatWrdNode, Lattice::LatWrdArc, Lattice::LatTphNode, Lattice::LatTphArc>, TphArc<Lattice::LatWrdNode, Lattice::LatWrdArc, Lattice::LatTphNode, Lattice::LatTphArc> > const &, TphNet<Lattice::LatWrdNode, Lattice::LatWrdArc, Lattice::LatTphNode, Lattice::LatTphArc>::TphLabel, Network<TphNode<Lattice::LatWrdNode, Lattice::LatWrdArc, Lattice::LatTphNode, Lattice::LatTphArc>, TphArc<Lattice::LatWrdNode, Lattice::LatWrdA!
rc, Lattice::LatTphNode, Lattice::LatTphArc> >::ArcLabel)+0x41): undefined reference to `void member_info<Lattice::LatWrdNode, Lattice::LatWrdArc, Lattice::LatTphNode, Lattice::LatTphArc>(ostream &, TphNet<Lattice::LatWrdNode, Lattice::LatWrdArc, Lattice::LatTphNode, Lattice::LatTphArc>::TphLabel const &)'
  obj.i686lin/LatRecog.od(.void gnu.linkonce.t.PrintNet<TphNode<Lattice::LatWrdNode, Lattice::LatWrdArc, Lattice::LatTphNode, Lattice::LatTphArc>, TphArc<Lattice::LatWrdNode, Lattice::LatWrdArc, Lattice::LatTphNode, Lattice::LatTphArc>, TphNet<Lattice::LatWrdNode, Lattice::LatWrdArc, Lattice::LatTphNode, Lattice::LatTphArc>::TphLabel, Network<TphNode<Lattice::LatWrdNode, Lattice::LatWrdArc, Lattice::LatTphNode, Lattice::LatTphArc>, TphArc<Lattice::LatWrdNode, Lattice::LatWrdArc, Lattice::LatTphNode, Lattice::LatTphArc> >::ArcLabel>(ostream &, Network<TphNode<Lattice::LatWrdNode, Lattice::LatWrdArc, Lattice::LatTphNode, Lattice::LatTphArc>, TphArc<Lattice::LatWrdNode, Lattice::LatWrdArc, Lattice::LatTphNode, Lattice::LatTphArc> > const &, TphNet<Lattice::LatWrdNode, Lattice::LatWrdArc, Lattice::LatTphNode, Lattice::LatTphArc>::TphLabel, Network<TphNode<Lattice::LatWrdNode, Lattice::LatWrdArc, Lattice::LatTphNode, Lattice::LatTphArc>, TphArc<Lattice::LatWrdNode, Lattice::LatWrdA!
rc, Lattice::LatTphNode, Lattice::LatTphArc> >::ArcLabel)+0x73): undefined reference to `void member_info<TphNode<Lattice::LatWrdNode, Lattice::LatWrdArc, Lattice::LatTphNode, Lattice::LatTphArc>, TphArc<Lattice::LatWrdNode, Lattice::LatWrdArc, Lattice::LatTphNode, Lattice::LatTphArc> >(ostream &, Network<TphNode<Lattice::LatWrdNode, Lattice::LatWrdArc, Lattice::LatTphNode, Lattice::LatTphArc>, TphArc<Lattice::LatWrdNode, Lattice::LatWrdArc, Lattice::LatTphNode, Lattice::LatTphArc> >::ArcLabel const &)'
  obj.i686lin/LatRecog.od(.void gnu.linkonce.t.PrintNet<TphNode<Lattice::LatWrdNode, Lattice::LatWrdArc, Lattice::LatTphNode, Lattice::LatTphArc>, TphArc<Lattice::LatWrdNode, Lattice::LatWrdArc, Lattice::LatTphNode, Lattice::LatTphArc>, TphNet<Lattice::LatWrdNode, Lattice::LatWrdArc, Lattice::LatTphNode, Lattice::LatTphArc>::TphLabel, Network<TphNode<Lattice::LatWrdNode, Lattice::LatWrdArc, Lattice::LatTphNode, Lattice::LatTphArc>, TphArc<Lattice::LatWrdNode, Lattice::LatWrdArc, Lattice::LatTphNode, Lattice::LatTphArc> >::ArcLabel>(ostream &, Network<TphNode<Lattice::LatWrdNode, Lattice::LatWrdArc, Lattice::LatTphNode, Lattice::LatTphArc>, TphArc<Lattice::LatWrdNode, Lattice::LatWrdArc, Lattice::LatTphNode, Lattice::LatTphArc> > const &, TphNet<Lattice::LatWrdNode, Lattice::LatWrdArc, Lattice::LatTphNode, Lattice::LatTphArc>::TphLabel, Network<TphNode<Lattice::LatWrdNode, Lattice::LatWrdArc, Lattice::LatTphNode, Lattice::LatTphArc>, TphArc<Lattice::LatWrdNode, Lattice::LatWrdA!
rc, Lattice::LatTphNode, Lattice::LatTphArc> >::ArcLabel)+0x144): undefined reference to `ostream & operator<<<Lattice::LatWrdNode, Lattice::LatWrdArc, Lattice::LatTphNode, Lattice::LatTphArc>(ostream &, TphNet<Lattice::LatWrdNode, Lattice::LatWrdArc, Lattice::LatTphNode, Lattice::LatTphArc>::TphLabel const &)'
  obj.i686lin/LatRecog.od(.void gnu.linkonce.t.PrintNet<TphNode<Lattice::LatWrdNode, Lattice::LatWrdArc, Lattice::LatTphNode, Lattice::LatTphArc>, TphArc<Lattice::LatWrdNode, Lattice::LatWrdArc, Lattice::LatTphNode, Lattice::LatTphArc>, TphNet<Lattice::LatWrdNode, Lattice::LatWrdArc, Lattice::LatTphNode, Lattice::LatTphArc>::TphLabel, Network<TphNode<Lattice::LatWrdNode, Lattice::LatWrdArc, Lattice::LatTphNode, Lattice::LatTphArc>, TphArc<Lattice::LatWrdNode, Lattice::LatWrdArc, Lattice::LatTphNode, Lattice::LatTphArc> >::ArcLabel>(ostream &, Network<TphNode<Lattice::LatWrdNode, Lattice::LatWrdArc, Lattice::LatTphNode, Lattice::LatTphArc>, TphArc<Lattice::LatWrdNode, Lattice::LatWrdArc, Lattice::LatTphNode, Lattice::LatTphArc> > const &, TphNet<Lattice::LatWrdNode, Lattice::LatWrdArc, Lattice::LatTphNode, Lattice::LatTphArc>::TphLabel, Network<TphNode<Lattice::LatWrdNode, Lattice::LatWrdArc, Lattice::LatTphNode, Lattice::LatTphArc>, TphArc<Lattice::LatWrdNode, Lattice::LatWrdA!
rc, Lattice::LatTphNode, Lattice::LatTphArc> >::ArcLabel)+0x214): undefined reference to `ostream & operator<<<TphNode<Lattice::LatWrdNode, Lattice::LatWrdArc, Lattice::LatTphNode, Lattice::LatTphArc>, TphArc<Lattice::LatWrdNode, Lattice::LatWrdArc, Lattice::LatTphNode, Lattice::LatTphArc> >(ostream &, Network<TphNode<Lattice::LatWrdNode, Lattice::LatWrdArc, Lattice::LatTphNode, Lattice::LatTphArc>, TphArc<Lattice::LatWrdNode, Lattice::LatWrdArc, Lattice::LatTphNode, Lattice::LatTphArc> >::ArcLabel const &)'
  collect2: ld returned 1 exit status
  %


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]