From: khan@xraylith.wisc.edu (Mumit Khan)
Subject: Re: Standard Template Library
1 Jul 1997 23:42:05 -0700
Approved: cygnus.gnu-win32@cygnus.com
Distribution: cygnus
Message-ID: <9707020459.AA26234.cygnus.gnu-win32@modi.xraylith.wisc.edu>
Original-To: Cheung Kwok Hung <cheungkh@cs.ust.hk>, gnu-win32@cygnus.com
In-Reply-To: Your message of "Wed, 02 Jul 1997 02:41:25 +0800."
             <199707011841.CAA01890@cssu147.cs.ust.hk> 
Original-Sender: owner-gnu-win32@cygnus.com

Cheung Kwok Hung <cheungkh@cs.ust.hk> writes:
> Hi,
> 
> Is there anybody try to use the gcc for Win32 with STL? I encounter a lot
> of multiple definition errors during linking phase if I use STL container
> in more than one source files. When I trace into the system header files.
> I find that there is a header file "alloc.h" in /usr/include/g++ which
> declare some static variables, which originate multiple declaration. I
> also find that the STL headers provided in beta 18 is different from that
> I got in "normal" gcc v.2.7.2. What is the problem?
> 

I use quite a bit of STL in my code, and some of it works under gnu-win32
(unfortunately, g++ can't grok most of the most the recent code I've 
written, so I have to stick to EDG based compilers).

It'll be helpful to know what options you use. I tend to instantiate 
explicitly using instantiation files, and supply -fno-implicit-templates 
for everything (except for the instantiation files). See my STL Newbie
guide (horribly outdated, but still has some useful info IMO) for more
info on using STL with g++. URL after sig.

regards,
Mumit -- khan@xraylith.wisc.edu
http://www.xraylith.wisc.edu/~khan/
http://www.xraylith.wisc.edu/~khan/software/stl/STL.newbie.html

Cc: gnu-win32 mailing list, Cheung Kwok Hung <cheungkh@cs.ust.hk>
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".
