This is the mail archive of the
cygwin@cygwin.com
mailing list for the Cygwin project.
Re: gcc2-2.95.3-7 uploaded
- From: Charles Wilson <cwilson at ece dot gatech dot edu>
- To: cygwin at cygwin dot com
- Date: Tue, 09 Jul 2002 23:22:13 -0400
- Subject: Re: gcc2-2.95.3-7 uploaded
- References: <20020709061152.GA7903@redhat.com>
Christopher Faylor wrote:
This should fix the problem with finding libstdc++.a. For the record,
libstdc++.a has been renamed to libstdc++-2.a in this package. I've
used this version to successfully compile Chuck's test case (thanks
again, Chuck).
All of the small test programs in dllhelpers (0.4.0, but modified
slightly; new release soon) compile with this release; all you have to
do is 'export CC=gcc-2; export CXX=g++-2; export FC=g77-2' and you're
golden.
This includes C, C++, and Fortran tests -- as well as autotool-driven
tests. And yes, they do link with the "correct" libstdc++ library.
A few nits: the info files are fouled up. For some reason, all of the
internal references are to e.g. 'gcc-2-2.info' instead of 'gcc-2.info'
Once I ran them all thru a sed script --- and fixed up the dir file --
all was well.
This release also includes a couple of spec file tweaks (adds
libmingwex.a to the -mno-cygwin case) and it includes g77-2.exe.
g77-2.exe is completely untested, however. And, it will always be thus.
*I* briefly tested g77-2. It worked for me; YMMV.
I tested a barebones C dll with auto-import and -mno-cygwin. It worked.
Now for the bad news...
Using the attached example, I set CXX=`pwd`/mg++ and then ran make.
While the DLL was built correctly, I had problems compiling the usedll.c
file:
mg++ -c -I. -g -o usedll.o usedll.cc
In file included from /usr/include/mingw/g++-3/streambuf.h:36,
from /usr/include/mingw/g++-3/iostream.h:31,
from /usr/include/mingw/g++-3/iostream:6,
from usedll.cc:1:
/usr/include/mingw/g++-3/libio.h:59: sys/cdefs.h: No such file or directory
make: *** [usedll.o] Error 1
Now, the official cygwin packages don't put anything in
/usr/include/mingw/g++-3/ at all -- that's why we've always in the past
had to 'cd /usr/include/mingw; ln -s ../g++-3 g++-3'.
However, I've got a "cygwin host, mingw-target" cross compiler that
actually puts the real deal into /usr/include/mingw/g++-3 -- but,
perhaps I have a version mismatch. So, I moved my custom stuff out of
the way, created the symlink...
Unfortunately, that didn't work either. So there's some problem with
the C++ headers and 'g++-2 -mno-cygwin'
I'm still working on rebuilding gcc3.
Weeelll, using gcc-3.1.1, building the 'C' dllhelper worked fine, but
once again, the C++ example failed:
g++ -c -I. -g -o usedll.o usedll.cc
usedll.cc:1:20: iostream: No such file or directory
usedll.cc: In function `int main()':
usedll.cc:10: `cout' undeclared (first use this function)
usedll.cc:10: (Each undeclared identifier is reported only once for each
function it appears in.)
usedll.cc:11: `endl' undeclared (first use this function)
make: *** [usedll.o] Error 1
So, after doing 'export CPPFLAGS=-I/usr/include/c++/3.1.1' (*) and
trying again, all *kinds* of terrible things happened:
g++ -c -I. -I/usr/include/c++/3.1.1 -g -o usedll.o usedll.cc
In file included from usedll.cc:1:
/usr/include/c++/3.1.1/iostream:44:28: bits/c++config.h: No such file or
directory
In file included from /usr/include/c++/3.1.1/ios:44,
from /usr/include/c++/3.1.1/ostream:45,
from /usr/include/c++/3.1.1/iostream:45,
from usedll.cc:1:
/usr/include/c++/3.1.1/iosfwd:44:28: bits/c++config.h: No such file or
directory
In file included from /usr/include/c++/3.1.1/iosfwd:45,
from /usr/include/c++/3.1.1/ios:44,
from /usr/include/c++/3.1.1/ostream:45,
from /usr/include/c++/3.1.1/iostream:45,
from usedll.cc:1:
....(much more)....
(*) first off, that *can't* be right, can it? shouldn't the C++ headers
be installed in /usr/include/g++-v3/, not /usr/include/c++/3.1.1/ ?
Well, after doing a blind 'cd /usr/include; mv c++/3.1.1 g++-v3' and
trying again, no joy with -I/usr/include/g++-v3 or without any extra -I's.
I'm stumped.
Summary:
gcc2-2.95.3-7: gcc-2 g++-2, and g77-2 seem to work in 'cygwin' mode
gcc-2 works in -mno-cygwin mode
g++-2 does not (didn't test g77-2 -mno-cygwin)
info files scrogged
gcc-3.1.1
gcc seems to work
g++ does not
--Chuck
Attachment:
cxx-2.tar.bz2
Description: Binary data
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/