From: jkolen AT typhoon DOT coginst DOT uwf DOT edu (John F. Kolen) Subject: STL alloc and templates 17 Dec 1996 08:00:49 -0800 Sender: daemon AT cygnus DOT com Approved: cygnus DOT gnu-win32 AT cygnus DOT com Distribution: cygnus Message-ID: <9612170919.ZM1418.cygnus.gnu-win32@typhoon.coginst.uwf.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Z-Mail (3.2.0 26oct94 MediaMail) Original-To: gnu-win32 AT cygnus DOT com Original-Sender: owner-gnu-win32 AT cygnus DOT com /*I'm not sure if this is the place to post this, but here goes.*/ I tried using the list data structure from the c++ STL. It works fine if used in a single source file. However, if I try to have two source files using list (or anything else that uses the default alloc) I get data and function definitions appearing in both object files due to template expansions. The culprit is alloc.h which does things along the lines of: template default_alloc::count=0; Since there are no #pragma interface lines to be found in alloc.h, I assume there is a set of command line incantations to compile multi-source files relying on STL and alloc.h. Thanks in advance for any hints, pointers, or solutions. -- John F. Kolen voice: (904)474-3075 Assistant Professor fax: (904)474-3023 Dept. of Computer Science University of West Florida Pensacola, FL 32514 - For help on using this list, send a message to "gnu-win32-request AT cygnus DOT com" with one line of text: "help".