undefined reference to `c_demande virtual table'

polux moon polux.moon@wanadoo.fr
Mon May 6 04:14:00 GMT 2002


Bonjour
I have a program with a class that have virtual fonction and when i link i
have this message

g++  -Wall -Woverloaded-virtual -ansi  -c -o c_solution.o c_solution.cpp
g++  -Wall -Woverloaded-virtual -ansi  -c -o c_profile.o c_profile.cpp
g++  -Wall -Woverloaded-virtual -ansi  -c -o c_info_permanente.o
c_info_permanente.cpp
g++  -Wall -Woverloaded-virtual -ansi  -c -o type.o type.cpp
g++  -Wall -Woverloaded-virtual -ansi  -c -o c_raffinement.o
c_raffinement.cpp
g++  -Wall -Woverloaded-virtual -ansi  -c -o c_demande.o c_demande.cpp
g++  -Wall -Woverloaded-virtual -ansi  -c -o c_demande_noyau.o
c_demande_noyau.cpp
g++  -Wall -Woverloaded-virtual -ansi  -c -o c_demande_interieur.o
c_demande_interieur.cpp
g++  -Wall -Woverloaded-virtual -ansi  -c -o test_raff.o test_raff.cpp
g++ -Wall -Woverloaded-virtual -ansi -o test_r c_solution.o c_profile.o
c_info_permanente.o type.o c_raffinement.o c_demande.o c_demande_noyau.o
c_demande_interieur.o test_raff.o
c_raffinement.cpp: In method `bool c_raffinement::verif()':
c_raffinement.cpp:89: warning: comparison between signed and unsigned



c_demande.o: In function `c_demande::c_demande(int, c_raffinement)':
c_demande.o(.text+0x11): undefined reference to `c_demande virtual table'
c_demande_noyau.o: In function `c_demande_noyau type_info function':
c_demande_noyau.o(.gnu.linkonce.t.__tf15c_demande_noyau+0x10): undefined
reference to `c_demande type_info function'
c_demande_noyau.o(.gnu.linkonce.t.__tf15c_demande_noyau+0x1a): undefined
reference to `c_demande type_info node'
c_demande_interieur.o: In function `c_demande_interieur type_info function':
c_demande_interieur.o(.gnu.linkonce.t.__tf19c_demande_interieur+0x10):
undefined reference to `c_demande type_info function'
c_demande_interieur.o(.gnu.linkonce.t.__tf19c_demande_interieur+0x1a):
undefined reference to `c_demande type_info node'
collect2: ld returned 1 exit status
make: *** [test_r] Error 1
c_demande is a class that has virtual fonctionc_demande_noyau is a class
that implements the virtual function
why it doesn t found the virtual table ?



More information about the Gcc-help mailing list