🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.gcc.help
Article #51382

gcc-2.3.3 template functions problem

#51382
From: Romain Kobylanski
Date: Thu, 27 May 1993 10:20
30 lines
1228 bytes
I have a problem of multiple definition
whith gcc-2.3.3 on SunOS4.1

when I compile this program

	//---------------------------------
	template <class T>
	void f(T v) { }

	main()
	{
		double x ;
		int i;

		f(x) ;
		f(i) ;
	}
	//---------------------------------

the assembleur tells me :
as: "/usr/tmp/cca24597.s", line 43:FATAL:Symbol _f already defined.

In fact the compileur generates then same symbol "_f"
for the two occurences of the template function.

what can I do ?


-- 
romain@cuefa.grenet.fr
Technical Details
Message-ID: <C7oKqs.AKL@imag.fr>
Path: arc1-ca.pugleaf.net!gmd.de!newsserver.jvnc.net!howland.reston.ans.net!zaphod.mps.ohio-state.edu!caen!batcomputer!ghost.dsi.unimi.it!univ-lyon1.fr!news.imag.fr!isis.imag.fr!imag.fr!kobylo

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 11318c,32b0e6ddbf7f02e3,start
X-Google-Attributes: gid11318c,public
X-Google-ArrivalTime: 1993-05-27 03:44:43 PST
Newsgroups: gnu.gcc.help
Path: arc1-ca.pugleaf.net!gmd.de!newsserver.jvnc.net!howland.reston.ans.net!zaphod.mps.ohio-state.edu!caen!batcomputer!ghost.dsi.unimi.it!univ-lyon1.fr!news.imag.fr!isis.imag.fr!imag.fr!kobylo
From: kobylo@imag.fr (Romain Kobylanski)
Subject: gcc-2.3.3 template functions problem 
Message-ID: <C7oKqs.AKL@imag.fr>
Sender: news@imag.fr (Administration des news)
Nntp-Posting-Host: localhost
Organization: IMAG Institute, University of Grenoble, France
Date: Thu, 27 May 1993 10:20:52 GMT
Lines: 30