I keep getting this error, when trying to compile my C
program in SCO (using gcc
).
I have had a look on Google, and found this other forum: Linux Questions, and that guy had the exact same issue as I am getting. So I tried his solution, which is adding a line at the top of the program.c
file:
#include "err.h"
I tried compiling again, and now I get one line back:
program.c:5: err.h: No such file or directory
- Do I need to add / install to get that file?
- Where would this file be in my file-system?
Thanks in advance.
EDIT
vi hello.c
:
/* Hello World program */
#include<stdio.h>
main()
{
printf("Hello World");
}
gcc -v hello.c
:
Reading specs from /usr/local/lib/gcc-lib/i386-pc-sco3.2v5.0.5/2.95.2/specs
gcc version 2.95.2 19991024 (release)
/usr/local/lib/gcc-lib/i386-pc-sco3.2v5.0.5/2.95.2/cpp -lang-c -v -D__GNUC__=2 -D__GNUC_MINOR__=95 -Asystem(svr3) -Acpu(i386) -Amachine(i386) -Di386 -D__i386 -D__i386__ -D__i386 -D__unix -D_SCO_DS=1 -D_M_I386 -D_M_XENIX -D_M_UNIX -D_STRICT_NAMES -D_SCO_XPG_VERS=4 -D_M_I86 -D_M_I86SM -D_M_INTERNAT -D_M_SDATA -D_M_STEXT -D_M_BITFIELDS -D_M_SYS5 -D_M_SYSV -D_M_SYSIII -D_M_WORDSWAP -Dunix -DM_I386 -DM_UNIX -DM_XENIX -D_SCO_ELF -D_SCO_C_DIALECT=1 hello.c /usr/tmp/cc1HX7yg.i
GNU CPP version 2.95.2 19991024 (release) (i386, SCO OpenServer 5 Syntax)
#include "..." search starts here:
#include <...> search starts here:
/usr/local/include
/usr/local/lib/gcc-lib/i386-pc-sco3.2v5.0.5/2.95.2/../../../../i386-pc-sco3.2v5.0.5/include
/usr/local/lib/gcc-lib/i386-pc-sco3.2v5.0.5/2.95.2/include
/usr/include
End of search list.
The following default directories have been omitted from the search path:
/usr/local/lib/gcc-lib/i386-pc-sco3.2v5.0.5/2.95.2/../../../../include/g++-3
End of omitted list.
/usr/local/lib/gcc-lib/i386-pc-sco3.2v5.0.5/2.95.2/cc1 /usr/tmp/cc1HX7yg.i -quiet -dumpbase hello.c -version -o /usr/tmp/cc4HAEHq.s
GNU C version 2.95.2 19991024 (release) (i386-pc-sco3.2v5.0.5) compiled by GNU C version 2.95.2 19991024 (release).
In file included from hello.c:3:
/usr/include/stdio.h:140: parse error before `__gnuc_va_list'
/usr/include/stdio.h:140: parse error before `__gnuc_va_list'
/usr/include/stdio.h:140: parse error before `__gnuc_va_list'
gcc
it shows:gcc: No input files
. So I think it is installed now./u/test/installgnu/gcc/
folder. I then went into the terminal, usingPuTTY
, and un-tarred the file.tar xzvf gcc-2.95.2pl1-dist.tar.gz
- I seriously can't remember if I used the2.95.2pl1-dist...
or the 12.95.2pl1-VOLS.tar. I typed
gcc -v` and got this back:/usr/local/lib/gcc-lib/i386-pc-sco3.2v5.0.5/2.95.2/specs gcc version 2.95.2 19991024 (release)
. Does that help?scoadmin software
I installed gcc.