Mail Archives: cygwin/2002/07/10/00:59:51
On Tue, Jul 09, 2002 at 11:22:13PM -0400, Charles Wilson wrote:
>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.
Sigh. Moral of the story: always wipe out the install directory before
rebuilding.
>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'
Ok, looks like I really did need that /usr/include/mingw/_G_config.h file.
The problem is that if I include it here for the gcc-2 compilations, it conflicts
with the version that is used in gcc 3.
This was one of those "Meant to get around to it" problems. I shouldn't even
have released either gcc package without fixing this one. Sigh.
>>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/ ?
Right this is the problem that I mentioned on Monday:
*>I don't see exactly the same errors. I can't even compile your stuff
*>with g++. :-( It appears to be due to --enable-version-specific-runtime-libs,
*>AFAICT.
I can fix the gcc 3 problem. I am not sure to fix the gcc-2 problem.
*pause*
No, wait. I think I can fix this by copying the entire g++-3 directory
into /usr/include/mingw and putting a _G_config.h there. It isn't
pretty, but it should work ok.
Oh well, powers of two are always lucky. Here comes gcc2-2.95.3-8.
cgf
--
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/
- Raw text -