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]

Templates problems!


Why can I compile the program that is in the tar file above with the
simple line command :
g++ -o teste teste.cxx List.cxx
this is just a simple program to work with templates classes and evert
time I get the message :
/tmp/ccnVmVr5.o: In function `main':
/tmp/ccnVmVr5.o(.text+0xf): undefined reference to `List<int>::List(int,
int)'
/tmp/ccnVmVr5.o(.text+0x20): undefined reference to
`List<int>::read_from_File(char *)'
collect2: ld returned 1 exit status
The version of the compiler is :
Reading specs from
/usr/local/lib/gcc-lib/i686-pc-linux-gnu/egcs-2.91.66/specs
gcc version egcs-2.91.66 19990314/Linux (egcs-1.1.2 release)
Thanks for any help!

Denis Oliveira Damazio
PhD Student and Researcher at CERN
mailto: Denis.Oliveira.Damazio@cern.ch
Phone at CERN: (00 41 22) (76) 71652
http://home/cern.ch/damazio

trouble.tar


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