Mail Archives: cygwin/1998/06/10/03:19:58
I am trying to compile the following trivial C++ program using Cygwin32
Beta 19 on Windows NT 4.0:
#include <string>
using namespace std;
void main()
{
string s = "hello";
}
All my attempts are choking in the link phase:
% g++ hello.cpp
[...]/libstdc++.a [...] multiple definition of `basic_string[...]'
[...]hello.cc: first defined here
Or, if I try:
% g++ -frepo -c hello.cpp
% g++ hello.o -o hello.exe
I get essentially the same problem.
I am new to cygwin32, but I have read the documentation about Borland
vs. Cfront support for templates, Mumit's STL guide for newbies, egcs
(not supported for Windows NT, right?) searched the archives, etc.
Any insight would be appreciated. I'd love to get my hands on a decent
Win32 C++ compiler, as I am quite tired of Visual C++'s lack of support
for templates. Hopefully, Cygwin32 is such a compiler, and this will be
an easy question to answer. Thanks.
-- Brian
-
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 -