From owner-freebsd-questions Wed Apr 12 10:32:53 1995 Return-Path: questions-owner Received: (from majordom@localhost) by freefall.cdrom.com (8.6.10/8.6.6) id KAA18586 for questions-outgoing; Wed, 12 Apr 1995 10:32:53 -0700 Received: from maggie.cs.mcgill.ca (sarrazip@maggie.CS.McGill.CA [132.206.51.242]) by freefall.cdrom.com (8.6.10/8.6.6) with ESMTP id KAA18580 for ; Wed, 12 Apr 1995 10:32:45 -0700 Received: (from sarrazip@localhost) by maggie.cs.mcgill.ca (8.6.10/8.6.9) id NAA21052 for FreeBSD-questions@freefall.cdrom.com; Wed, 12 Apr 1995 13:32:36 -0400 Date: Wed, 12 Apr 1995 13:32:36 -0400 From: Pierre SARRAZIN Message-Id: <199504121732.NAA21052@maggie.cs.mcgill.ca> To: FreeBSD-questions@freefall.cdrom.com Subject: g++ and templates Sender: questions-owner@FreeBSD.org Precedence: bulk Hi. I'm running FreeBSD 2.0-RELEASE and I'm trying to compile a C++ program that I wrote. The source contains no g++-specific directives, and I would like it to stay that way, if possible. The problem is that template definitions appear more than once in the object files. Isn't there a way to tell g++ or the linker to ignore cases like this? The following are some error messages from g++: g++ -g -O6 -D_Xlib_Implementation_ -I/usr/X11R6/include -c fastrot.cc [...] g++ -g -O6 -D_Xlib_Implementation_ -I/usr/X11R6/include -c xlibdisp.cc g++ -g -O6 -D_Xlib_Implementation_ -I/usr/X11R6/include -o fastrot fastrot.o matrix.o trad.o zeroes.o altform.o proposed.o figure.o threedim.o twodim.o xlibdisp.o -lXext -lX11 -lm queueptr.h:72: Definition of symbol `___t8QueuePtr1Z5Point20PolitiqueDestruction' (multiply defined) queueptr.h:79: Definition of symbol `__$_t8QueuePtr1Z5Point' (multiply defined) listeptr.h:85: Definition of symbol `_cardinal__Ct8ListePtr1Z5Point' (multiply defined) [...] Pierre Sarrazin [Montreal]