This is the mail archive of the gcc-help@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]
Other format: [Raw text]

gcc 2.95.3 linker problems??


Hello,

I am using gcc 3.0.3 to compile and run some C++ programs that
use templates and pure virtual functions. I am using the shared
library version of stdc++. Things work fine this way. Except for 
one thing -- gdb does not want to work. It dumps core even
if I do something so simple as: "where".

Therefore, in order to be able to debug my programs, I was forced
to move back to gcc 2.95.3. I have a problem. I am aware that this
issue has been answered many times in the newsgroup but the solution
proposed therein does not help me at all.

At link time, collect2 gives me the following error:

	Undefined                       first referenced
	 symbol                             in file
	XXXX::cpu virtual table     /home/ramanand/cpu/models/cpu.o


The proposed solutions all recommend that I check and make sure that
all virtual functions have definitions (or some variant of this
solution).
I HAVE CHECKED AND ENSURED THAT ALL DEFINITIONS DO EXIST. 
I have also experimented with -fvtable-thunks and-fno-vtable-thunks.
Neither option works. 

Any help would be appreciated.

Thanks 

Ramanand


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