Error building 4.0.1: input.h: No such file...

2005-07-12 Thread Chris Garrett
I built 4.0.0 last week and thought I would update to 4.0.1. While 
building 401 I got the following error:


--
gcc -c   -g -DENABLE_CHECKING -DENABLE_ASSERT_CHECKING -DIN_GCC   -W 
-Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes 
-Wold-style-definition  -Wno-error  -DHAVE_CONFIG_H -DGENERATOR_FILE
-I. -Ibuild -I/d/developer/src/gcc-4.0.1/gcc 
-I/d/developer/src/gcc-4.0.1/gcc/build 
-I/d/developer/src/gcc-4.0.1/gcc/../include 
-I/d/developer/src/gcc-4.0.1/gcc/../libcpp/include 
-I/usr/local/gmp-4.1.4/include  \

-o build/gengtype-yacc.o /d/developer/src/gcc-4.0.1/gcc/gengtype-yacc.c
gcc   -g -DENABLE_CHECKING -DENABLE_ASSERT_CHECKING -DIN_GCC   -W -Wall 
-Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes 
-Wold-style-definition-DHAVE_CONFIG_H -DGENERATOR_FILE -s -o 
build/gengtype.exe \

build/gengtype.o build/gengtype-lex.o build/gengtype-yacc.o \
build/errors.o ../build-i686-pc-mingw32/libiberty/libiberty.a
build/gengtype.exe
/d/developer/src/gcc-4.0.1/gcc/input.h: No such file or directory
make[2]: *** [s-gtype] Error 1
make[2]: Leaving directory `/d/developer/projects/chinook_lib/gcc/build/gcc'
make[1]: *** [stage1_build] Error 2
make[1]: Leaving directory `/d/developer/projects/chinook_lib/gcc/build/gcc'
make: *** [bootstrap] Error 2
--

The file exists in that location so I'm not sure what to do with this. 
I'm building on winxp pro, GCC 3.4.1 using Msys.


Config line:
--
../gcc-4.0.1/configure \
   --prefix=/mingw \
   --with-gcc \
   --with-gnu-ld \
   --with-gnu-as \
   --enable-threads \
   --disable-shared \
   --disable-nls \
   --enable-languages=c,c++,f95 \
   --disable-win32-registry \
   --with-gmp=/usr/local/gmp-4.1.4


Make cmd:
--
make \
   CFLAGS="-O2 -march=i686 -fomit-frame-pointer" \
   CXXFLAGS="-mthreads -O2 -march=i686 -fomit-frame-pointer" \
   LIBCFLAGS="-O2" \
   LIBCXXFLAGS="-O2 -fno-implicit-templates" \
   LDFLAGS="-s" \
   bootstrap


Any suggestions?

Thank you

Chris



Re: Error building 4.0.1: input.h: No such file...

2005-07-13 Thread Chris Garrett

Dave Murphy wrote:


Chris Garrett wrote:

I built 4.0.0 last week and thought I would update to 4.0.1. While 
building 401 I got the following error:


--
gcc -c   -g -DENABLE_CHECKING -DENABLE_ASSERT_CHECKING -DIN_GCC   -W 
-Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes 
-Wold-style-definition  -Wno-error  -DHAVE_CONFIG_H 
-DGENERATOR_FILE-I. -Ibuild -I/d/developer/src/gcc-4.0.1/gcc 
-I/d/developer/src/gcc-4.0.1/gcc/build 
-I/d/developer/src/gcc-4.0.1/gcc/../include 
-I/d/developer/src/gcc-4.0.1/gcc/../libcpp/include 
-I/usr/local/gmp-4.1.4/include  \

-o build/gengtype-yacc.o /d/developer/src/gcc-4.0.1/gcc/gengtype-yacc.c
gcc   -g -DENABLE_CHECKING -DENABLE_ASSERT_CHECKING -DIN_GCC   -W 
-Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes 
-Wold-style-definition-DHAVE_CONFIG_H -DGENERATOR_FILE -s -o 
build/gengtype.exe \

build/gengtype.o build/gengtype-lex.o build/gengtype-yacc.o \
build/errors.o ../build-i686-pc-mingw32/libiberty/libiberty.a
build/gengtype.exe
/d/developer/src/gcc-4.0.1/gcc/input.h: No such file or directory
make[2]: *** [s-gtype] Error 1
make[2]: Leaving directory 
`/d/developer/projects/chinook_lib/gcc/build/gcc'

make[1]: *** [stage1_build] Error 2
make[1]: Leaving directory 
`/d/developer/projects/chinook_lib/gcc/build/gcc'

make: *** [bootstrap] Error 2
--

The file exists in that location so I'm not sure what to do with 
this. I'm building on winxp pro, GCC 3.4.1 using Msys.


Config line:
--
../gcc-4.0.1/configure \
   --prefix=/mingw \
   --with-gcc \
   --with-gnu-ld \
   --with-gnu-as \
   --enable-threads \
   --disable-shared \
   --disable-nls \
   --enable-languages=c,c++,f95 \
   --disable-win32-registry \
   --with-gmp=/usr/local/gmp-4.1.4


Make cmd:
--
make \
   CFLAGS="-O2 -march=i686 -fomit-frame-pointer" \
   CXXFLAGS="-mthreads -O2 -march=i686 -fomit-frame-pointer" \
   LIBCFLAGS="-O2" \
   LIBCXXFLAGS="-O2 -fno-implicit-templates" \
   LDFLAGS="-s" \
   bootstrap


this patch should sort you out

Index: gcc/c-incpath.c
===
RCS file: /cvs/gcc/gcc/gcc/c-incpath.c,v
retrieving revision 1.21
diff -c -3 -p -r1.21 c-incpath.c
*** gcc/c-incpath.c23 Jan 2005 15:05:27 -1.21
--- gcc/c-incpath.c23 Feb 2005 19:39:49 -
*** add_path (char *path, int chain, int cxx
*** 331,343 
   cpp_dir *p;

 #if defined (HAVE_DOS_BASED_FILE_SYSTEM)
!   /* Convert all backslashes to slashes.  The native CRT stat()
!  function does not recognize a directory that ends in a backslash
!  (unless it is a drive root dir, such "c:\").  Forward slashes,
!  trailing or otherwise, cause no problems for stat().  */
!   char* c;
!   for (c = path; *c; c++)
! if (*c == '\\') *c = '/';
 #endif

   p = xmalloc (sizeof (cpp_dir));
--- 331,348 
   cpp_dir *p;

 #if defined (HAVE_DOS_BASED_FILE_SYSTEM)
!   /* Remove unnecessary trailing slashes.  On some versions of MS
!  Windows, trailing  _forward_ slashes cause no problems for stat().
!  On newer versions, stat() does not recognise a directory that ends
!  in a '\\' or '/', unless it is a drive root dir, such as "c:/",
!  where it is obligatory.  */
!   int pathlen = strlen (path);
!   char* end = path + pathlen - 1;
!   /* Preserve the lead '/' or lead "c:/".  */
!   char* start = path + (pathlen > 2 && path[1] == ':' ? 3 : 1);
!  !   for (; end > start && IS_DIR_SEPARATOR (*end); end--)
! *end = 0;
 #endif

   p = xmalloc (sizeof (cpp_dir));

I applied this patch last night and the same error still ocurrs. Any 
other hints?


Thank you

Chris





Re: PLEASE HELP!!

2005-07-27 Thread Chris Garrett

If you really need to just jump into it you can try Chinook
(http://www.degarrah.com/chinookfree.php). It's a cross platform IDE
that ships with GCC/GDB and is free.

Chris


louise kelliher wrote:

Hiya, im wondering if you could help me, Im at my wits end and need to 
cover c programming before I start a foundation internet technology 
course in September. I have been trying for 2 weeks and cant get past 
the first page. Please could you tell me how to download gcc -v on a 
windows xp computer. I found a list but none of them said 
MinGW-1.1.tar.gz and now I think Ive downloaded the wrong one as it 
wont work, and also I dont know how to create a directory. Please help 
me. Thanks for your time. Louise Kelliher











GCC 4.0.1 - iostream: No such file or dir....

2005-08-05 Thread Chris Garrett
I finally got 4.0.1 built in msys. I must have screwed up my msys/gcc 
setup because a clean install of msys and gcc-3.4.1 worked. I started 
with a simple test:


main.cpp:
~~
#include 

int main()
{
   cout << "Hello\n";
   return 0;
}


then I try and build it:
~~
[EMAIL PROTECTED] /d/tmp/simple$ g++ main.cpp -o main
main.cpp:1:20: error: iostream: No such file or directory
main.cpp: In function 'int main()':
main.cpp:5: error: 'cout' was not declared in this scope

I looked thru in /mingw/include/c++/4.0.1 and iostream exists in that 
directory. Is there something I'm missing? Do you need to specify gcc's 
include directories explicitly now?


Thank you

Chris


My system details:
WinXP Pro
GCC 3.4.1
Msys


config cmd:
~~
../gcc-4.0.1/configure \
   --prefix=/mingw \
   --with-gcc \
   --with-gnu-ld \
   --with-gnu-as \
   --enable-threads \
   --disable-shared \
   --disable-nls \
   --enable-languages=c,c++,f95 \
   --disable-win32-registry \
   --with-gmp=/usr/local/gmp-4.1.4


make cmd:
~~
make \
   CFLAGS="-O2 -march=i686 -fomit-frame-pointer" \
   CXXFLAGS="-mthreads -O2 -march=i686 -fomit-frame-pointer" \
   LIBCFLAGS="-O2" \
   LIBCXXFLAGS="-O2 -fno-implicit-templates" \
   LDFLAGS="-s" \
   bootstrap








Re: GCC 4.0.1 - iostream: No such file or dir....

2005-08-07 Thread Chris Garrett

[EMAIL PROTECTED] wrote:


Chris Garrett <[EMAIL PROTECTED]> wrote:
 


main.cpp:5: error: 'cout' was not declared in this scope
   


This question should have been sent to gcc-help, not here.
 


Sorry about this. What criteria is there for posting to gcc vs gcc-help?


But as long as I'm answering:

It's std::cout now, according to the C++ standard.
If you want to compile old code that wasn't aware of std,
you can stick
 using namespace std;
at the top.

 

Thanks for answering, I forgot to mention that I did try adding the 
namespace prefix and also the "using" statement and I get the same error. 


Thank you

Chris



Re: GCC 4.0.1 - iostream: No such file or dir....

2005-08-08 Thread Chris Garrett


Mike Stump wrote:


Sorry about this. What criteria is there for posting to gcc vs gcc-help?



If you want to contribute to the source code of gcc, the compiler, 
then those contributions go to gcc.  If one is using gcc, those issues 
go to gcc-help.



Ok Thank you

Chris