g++/cygwin-B19 linkage problem, multiple definitions
Mumit Khan
khan@xraylith.wisc.edu
Tue Oct 27 20:47:00 GMT 1998
Jan Reimers <janr@molienergy.bc.ca> writes:
>
>
> bash-2.01$ g++ -o test2 -I. -O2 test2.cc obj.cc
> C:\TEMP\ccfBTKHc.o(.text+0x14):obj.cc: multiple definition of
> `Middle<int>::~Mid
> dle(void)'
> C:\TEMP\ccQp5XtO.o(.text$_$_t6Middle1Zi+0x0):test2.cc: first defined
> here
> collect2: ld returned 1 exit status
> bash-2.01$
>
> The following are required to get the multiple definition:
> 1) Base must virtually inherited from Middle.
> 2) The compiler has to create ~Middle().
>
Reported Oct 10, 1998. See
http://www.cygnus.com/ml/egcs-bugs/1998-Oct/0043.html
Fixed in the mainline, but haven't looked at extracting the change needed
for release branch.
Regards,
Mumit
More information about the Gcc-bugs
mailing list