Mail Archives: cygwin/1997/07/01/23:42:05
Cheung Kwok Hung <cheungkh AT cs DOT ust DOT 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 AT xraylith DOT wisc DOT 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 AT cs DOT ust DOT hk>
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request AT cygnus DOT com" with one line of text: "help".
- Raw text -