gcc problem

Gareth Pearce tilps@probablyprime.net
Tue Mar 2 15:57:00 GMT 2004

> g++ is in a separate package named gcc-g++, be sure you have installed
> this too.  Then you need to link against libstdc++ when using gcc as
> driver:
>  gcc -o gtest gtest.cc -lstdc++
> or you use g++ as driver which includes libstdc++ automatically:
>  g++ -o gtest gtest.cc

Just want to drop my usual line here - Do use g++ rather then gcc -lstdc++
Since gcc -lstdc++ isn't always enough, and what is enough may not always be
enough in the future.

PS - in response to the other email - .cc Is pre-processor input - since
that's the Normal state for c++ code - pre-processor input of which the
output is then fed to a c++ compiler. (Virtually at least, in practice it
can end up being integrated somewhat.  The C standard allows 'as if'
interpretation in the implementation of the pre-processing component.)

Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

More information about the Cygwin mailing list