2

I am trying to compile a program using GCC in SCO, and I am unable to find the ctype.h file. I have managed to find the other files that were missing when compiling, like string.h etc.

I was getting this returned before I found where most of the other files were:

In file included from test.c:76:
strutil.c:2: string.h: No such file or directory
strutil.c:3: stdio.h: No such file or directory
In file included from test.c:77:
pcutils.h:3: ctype.h: No such file or directory
In file included from test.c:78:
pcutils.c:2: string.h: No such file or directory
pcutils.c:3: stdio.h: No such file or directory
test.c:79: time.h: No such file or directory
test.c:81: stdio.h: No such file or directory

Most of those files are in /opt/K/SKUNK99/Gcc/2.95.2pl1/usr/local/lib/gcc-lib/i386-pc-sco3.2v5.0.5/2.95.2/include/oldstyle

Now it is showing this:

In file included from test.c:77:
pcutils.h:3: ctype.h: No such file or directory

Therefore my question is:

  • Where can I find the ctype.h file?

This question is related to .profile in SCO

Kevdog777
  • 3,194
  • 18
  • 43
  • 64
  • `ctype.h` is part of the C standard library. You should get that by default. I don't know what OS you're on, but make a search for `glibc`. – Emanuel Berg Jul 23 '12 at 15:26
  • I'm using SCO Opensever 5.0.7 – Kevdog777 Jul 23 '12 at 15:29
  • OK, don't know anything about that, sorry. – Emanuel Berg Jul 23 '12 at 15:38
  • How did you install GCC? This looks like the Skunkware distribution, did you follow the [official instructions](http://www.sco.com/skunkware/devtools/index.html#gcc)? In particular, did you install the system libraries and headers as indicated? – Gilles 'SO- stop being evil' Jul 23 '12 at 21:51
  • @Gilles: I installed it using those instructions and also asked a question on this site [Install Compiler GCC in SCO](http://unix.stackexchange.com/questions/43177/install-compiler-gcc-in-sco). I followed the instruction that hhaamu gave me. – Kevdog777 Jul 24 '12 at 07:20

1 Answers1

2

ctype.h is part of the standard C library, so it really should be on your system somewhere. I don't use SCO, but on my various FreeBSD machines at home, and the numerous Solaris machines here at work, ctype.h is in /usr/include. If it's not there on your SCO machine, perhaps it's in /usr/local/include? Or perhaps there's some other standard location under SCO. find should be able to tell you where it is, in any case.

D_Bye
  • 13,797
  • 3
  • 42
  • 31
  • It's more complicated than that. On some “exotic” platforms, and I suspect (but I don't know) that SCO is exotic, GCC uses a modified version of the system headers. The installation process should have generated these headers and set the default include path to include their location though. – Gilles 'SO- stop being evil' Jul 23 '12 at 21:49