This is the mail archive of the mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: gcc2-2.95.3-7 uploaded

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. '' instead of '' 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
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,
/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 iostream: No such file or directory In function `int main()': `cout' undeclared (first use this function) (Each undeclared identifier is reported only once for each
function it appears in.) `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
In file included from
/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,
/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,
....(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.

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 seems to work
g++ does not


Attachment: cxx-2.tar.bz2
Description: Binary data

Unsubscribe info:
Bug reporting:

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]