Re: gcc setup problem
On Fri, 30 Jan 1998, Shane D. McAndrew wrote: > $ gcc hello.c > hello.c:1: iostream.h: No such file or directory > > > I have searched my whole hard-disk, and there is no file called iostream.h > However, I did find lots of other commonly used header files, such as > > usr/include/asm/string.h > usr/lib/gcc-lib/i486-linux/2.7.2.1/include/limits.h > > > Can anyone see what's gone wrong? Here is the program I am trying to compile - > > $ cat hello.c > #include > // This program prints "Hello, World." > main () > { > cout << "Hello, World.\n"; > return 0; > } Two probems. 1) You have a C++ program there, rename it to .cc and use g++ on it. 2) You need libg++27-dev -- Scott K. Ellis <[EMAIL PROTECTED]> http://www.gate.net/~storm/ -- TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to [EMAIL PROTECTED] . Trouble? e-mail to [EMAIL PROTECTED] .
Re: gcc setup problem
Can anyone see what's gone wrong? Here is the program I am trying to compile - $ cat hello.c #include // This program prints "Hello, World." main () { cout << "Hello, World.\n"; return 0; } Your basic problem is that this is not a C program. It is a C++ program. Thus, you must give it a C++ extension (rename it to hello.cc) and invoke the C++ compiler (`g++ hello.cc'). An equivalent C program: #include int main (void) { puts ("Hello, World."); return 0; } -- TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to [EMAIL PROTECTED] . Trouble? e-mail to [EMAIL PROTECTED] .
gcc setup problem
Hi, I am very new to C programming. I have recently installed Debian 1.3.1 including the following C development tools - gcc 2.7.2.1-9 libc55.4.33-6 cpp 2.7.2.1-9 binutils 2.7.0.9-3 libc5-dev5.4.33-6 libg++27 2.7.2.1-8 According to dselect, they are all installed correctly. When I try to compile a 'Hello, World' program, I get the following error - $ gcc hello.c hello.c:1: iostream.h: No such file or directory I have searched my whole hard-disk, and there is no file called iostream.h However, I did find lots of other commonly used header files, such as usr/include/asm/string.h usr/lib/gcc-lib/i486-linux/2.7.2.1/include/limits.h Can anyone see what's gone wrong? Here is the program I am trying to compile - $ cat hello.c #include // This program prints "Hello, World." main () { cout << "Hello, World.\n"; return 0; } Thanks in advance -Shane D. McAndrew === | Where were you at Jan 01 00:00:00 GMT 1970 ? | === -- TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to [EMAIL PROTECTED] . Trouble? e-mail to [EMAIL PROTECTED] .
Re: GCC setup problem
> No, no, no, no, no. *smacks Galen about a bit* > > gnats != gnat. _gnat_ is the Ada compiler that does/did evil > diversions, _gnats_ is the problem report management system, and it > has (afaik) 0 reason to be diverting gcc. > Sorry, I keep getting those two confused. *whack myself on head* --Galen -- TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to [EMAIL PROTECTED] . Trouble? e-mail to [EMAIL PROTECTED] .
Re: GCC setup problem
Galen Hazelwood <[EMAIL PROTECTED]> writes: > > gnats: 3.101-2 > > Old versions of gnats did something very bad. [...] No, no, no, no, no. *smacks Galen about a bit* gnats != gnat. _gnat_ is the Ada compiler that does/did evil diversions, _gnats_ is the problem report management system, and it has (afaik) 0 reason to be diverting gcc. Do what Galen said, only do it for gnat and not gnats :) -- James -- TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to [EMAIL PROTECTED] . Trouble? e-mail to [EMAIL PROTECTED] .
Re: GCC setup problem
Waller Martin MEJ wrote: > Hi Galen, > > Thanks for your response. Below the information you required, and > probably more... [snip] > cpp: 2.7.2.1-8 > gcc: 2.7.2.1-8 Okay so far... > >* output of "gcc --version" > #gcc --version > 2.7.2 Yikes! This is wrong! Since the version number is part of the path to the cc1 (etc.) executables, and the version number is hard-coded into gcc, it's looking for all of the support files in the wrong place. And the reason is... > gnats: 3.101-2 Old versions of gnats did something very bad. They diverted /usr/bin/gcc, and replaced it with their own Ada-supporting version. Which means that when the gcc version changed, the gcc program kept the obsolete version number. Oops. Purge gnats from your system, or upgrade to a later version which supplies its own "gnatgcc" binary. --Galen -- TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to [EMAIL PROTECTED] . Trouble? e-mail to [EMAIL PROTECTED] .
Re: GCC setup problem
Hi Galen, Thanks for your response. Below the information you required, and probably more... >> Hi, >> >> My GCC setup doesn't appear to be correct on my Debian 1.3.1 and 1.2 >> system. Initially after installing it, whenever I tried to run it, the >> message: >> >> GCC installation problem: >> cannot find cc1: no such file or directory >> >> cc1 (and cc1plus, and libgcc.a...) were in >> /usr/lib/gcc-lib/i486-linux/2.7.2.1/, so I created links in /usr/lib to >> them. >> >Unfortunately, as you discovered later, this is a bogus workaround. It >deprives dpkg of information it needs. > >You haven't given me enough information to figure out what's wrong. I >need to know the following: > >* installed version of cpp and gcc packages from dselect: cpp: 2.7.2.1-8 gcc: 2.7.2.1-8 bin86: 0.4-3 binutils: 2.7.0.9-3 libc5-dev: 5.4.33-3 libg++27-dev: 2.7.2.1-8 make: 3.75-4 >* output of "gcc --version" #gcc --version 2.7.2 # and #gcc -v gcc version 2.7.2 # >* if you have gnats installed, which version Again from dselect: gnats: 3.101-2 gnats-tk: 3.101-2 > >--Galen Hope that's enough info, Thanks again, Martin -- TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to [EMAIL PROTECTED] . Trouble? e-mail to [EMAIL PROTECTED] .
RE: GCC setup problem
> Hi, > > My GCC setup doesn't appear to be correct on my Debian 1.3.1 and 1.2 > system. Initially after installing it, whenever I tried to run it, the > message: > > GCC installation problem: > cannot find cc1: no such file or directory > > cc1 (and cc1plus, and libgcc.a...) were in > /usr/lib/gcc-lib/i486-linux/2.7.2.1/, so I created links in /usr/lib to > them. > Unfortunately, as you discovered later, this is a bogus workaround. It deprives dpkg of information it needs. You haven't given me enough information to figure out what's wrong. I need to know the following: * installed version of cpp and gcc packages * output of "gcc --version" * if you have gnats installed, which version --Galen -- TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to [EMAIL PROTECTED] . Trouble? e-mail to [EMAIL PROTECTED] .
GCC setup problem
Hi, My GCC setup doesn't appear to be correct on my Debian 1.3.1 and 1.2 system. Initially after installing it, whenever I tried to run it, the message: GCC installation problem: cannot find cc1: no such file or directory cc1 (and cc1plus, and libgcc.a...) were in /usr/lib/gcc-lib/i486-linux/2.7.2.1/, so I created links in /usr/lib to them. I could compile things and stuff then (like you'd want to do with gcc...). Recently, however, i was using make-kpkg to recompile the kernel and it puked out the following error messages including: dpkg: unexpected output from `gcc --print-libgcc-file-name': `/usr/lib/libgcc.a' dpkg: compiler libgcc filename not understood: no gcc-lib component The same error message comes from trying: #dpkg --print-architecture and #gcc --print-libgcc-file-name produces: /usr/lib/libgcc.a I tried removing and purging gcc. However, gcc was still in /usr/bin(version 2.7.2). But trying to compile with that 'residual' gcc gave as above: GCC installation problem: cannot find cc1: no such file or directory yet gcc -v worked. find /usr -name gcc gave: /usr/bin Re-installing gcc corrected the above problem but I _still_ get errors from dpkg --print-architecture which means i can't recompile my kernel using make-kpkg. Assistance is needed to identify exactly what's going on and how I can correct it...purging (_) and re-installing (*) after re-booting doesn't work. Thanks, Martin -- TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to [EMAIL PROTECTED] . Trouble? e-mail to [EMAIL PROTECTED] .