0
include<stdio.h>

and when i used gcc to complie , this came out :

/usr/local/include/stdio.h:205:10: fatal error: '_ctermid.h' file not found

Something went wrong today . It used to complie a few days ago

here is the source code of stdio.h on my mac

...............

/* Additional functionality provided by:
 * POSIX.1-1988
 */

#if __DARWIN_C_LEVEL >= 198808L
#define L_ctermid   1024    /* size for ctermid(); PATH_MAX */

__BEGIN_DECLS
#include <_ctermid.h>  // here is the stdio.h:205:10

#if defined(_DARWIN_UNLIMITED_STREAMS) || defined(_DARWIN_C_SOURCE)
FILE    *fdopen(int, const char *) __DARWIN_ALIAS_STARTING(__MAC_10_6, __IPHONE_3_2, __DARWIN_EXTSN(fdopen));
#else /* !_DARWIN_UNLIMITED_STREAMS && !_DARWIN_C_SOURCE */
FILE    *fdopen(int, const char *) __DARWIN_ALIAS_STARTING(__MAC_10_6, __IPHONE_2_0, __DARWIN_ALIAS(fdopen));
#endif /* (DARWIN_UNLIMITED_STREAMS || _DARWIN_C_SOURCE) */
int  fileno(FILE *);
__END_DECLS
#endif /* __DARWIN_C_LEVEL >= 198808L */

..................
Razneesh
  • 1,147
  • 3
  • 13
  • 29
happy coding
  • 27
  • 1
  • 6
  • 1
    You are probably running into some variant of the trouble diagnosed in [Can't compile C program on a Mac after upgrade to Mojave](https://stackoverflow.com/questions/52509602/cant-compile-c-program-on-a-mac-after-upgrade-to-mojave/52530212#52530212). It isn't clear that it is identical because you still have a file to look at. There was an update to XCode (v11.0) released a day or two ago — for macOS Catalina and iOS 13, etc — that may have auto-installed and made some changes. For me, that went smoothly, but YMMV and maybe the answer is in that Q&A. – Jonathan Leffler Sep 24 '19 at 17:38
  • thank you . I found the wrong reason . i made soft link link xcode/include to /usr/local/include – happy coding Sep 26 '19 at 09:06

0 Answers0