This is the mail archive of the cygwin@sourceware.cygnus.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Standard Template Library


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".


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]