Mail Archives: cygwin/1998/06/18/00:55:55
Thanks. I am now successfully using egcs to compile and link my C++
program. My question now is: Should I be using the -frepo option? When
I do, I get linker errors. When I don't, everything links and runs
fine, but the resulting executable is quite large (esp. in comparison to
the corresponding .exe produced by VC++) -- I wonder if it contains
redundant template instantiations? The archive info on this topic seems
somewhat muddled. What's the current behavior?
-- Brian
-----Original Message-----
From: Mumit Khan [mailto:khan AT xraylith DOT wisc DOT edu]
Sent: Wednesday, June 10, 1998 11:15 AM
To: Berns, Brian
Subject: Re: Newbie template linking problem
On Tue, 9 Jun 1998, Berns, Brian wrote:
> 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
>
Update your compiler to egcs-1.0.2 which has no problem with this. See
http://www.xraylith.wisc.edu/~khan/software/gnu-win32/ for more info
on how downloading and installing egcs-1.0.2 for Cygwin32.
Mumit
-
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 -