🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.gcc.help
Article #51547

Instatiation of template functions with GCC 2.3.3

#51547
From: Yongqi Yang
Date: Tue, 27 Apr 1993 05:26
20 lines
1951 bytes
I had a problem with the GCC 2.3.3 I installed on my machine. I got the
following error messages when I tried an example program from Lippman's book:

as: "/usr/tmp/cca10008.s", line 304: error: redefinition of symbol "_display"
as: "/usr/tmp/cca10008.s", line 359: error: redefinition of symbol "_qsort"
as: "/usr/tmp/cca10008.s", line 495: error: redefinition of symbol "_swap"

where display, qsort and swap are all template functions. The error happened
at the place when I instatiated those template function for the second time.
The code that I used was copied from Lippman's "C++ Primer", and I tried with
Borland C++ on my PC and another machine running gcc, it worked fine. I wonder
if I did do something incorrectly when I installed gcc on this machine, which is
an Sun ELC, running SunOS 4.1.1. I used all the default actions when I installed
gcc on this machine. The as referred by the above error message
is the generic as: /usr/bin/as. It looks to me it is a problem with code
generation. Any help is appreciated. Thanks.
-- 
 Yongqi Yang                yyang@nosy.chem.wsu.edu

**************************************************************
Technical Details
Message-ID: <1993Apr27.052620.21398@serval.net.wsu.edu>
Path: arc1-ca.pugleaf.net!gmd.de!Germany.EU.net!mcsun!uunet!ogicse!pnl-oracle!netnews.nwnet.net!serval!NOSY.chem.wsu.edu!yyang

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 11318c,1e66ec8c6059c91e,start
X-Google-Attributes: gid11318c,public
X-Google-Thread: 109fba,1e66ec8c6059c91e,start
X-Google-Attributes: gid109fba,public
X-Google-ArrivalTime: 1993-05-03 12:38:03 PST
Path: arc1-ca.pugleaf.net!gmd.de!Germany.EU.net!mcsun!uunet!ogicse!pnl-oracle!netnews.nwnet.net!serval!NOSY.chem.wsu.edu!yyang
From: yyang@NOSY.chem.wsu.edu (Yongqi Yang)
Newsgroups: gnu.gcc.help,comp.lang.c++
Subject: Instatiation of template functions with GCC 2.3.3
Message-ID: <1993Apr27.052620.21398@serval.net.wsu.edu>
Date: 27 Apr 93 05:26:20 GMT
Article-I.D.: serval.1993Apr27.052620.21398
Sender: news@serval.net.wsu.edu (USENET News System)
Distribution: gnu
Organization: Washington State University
Lines: 20