C Compiler error from standard headers - undefined C++ definitions

前端 未结 1 1662
独厮守ぢ
独厮守ぢ 2021-01-25 12:18

I\'m trying to compile a C program, but receive many errors.

The errors are encountered in standard C headers files (inttypes.h, stdio.h, stat.h, etc).

The sour

相关标签:
1条回答
  • 2021-01-25 13:11

    I found the problem:

    These constants were supposed to be defined in sys/cdefs.h.

    For some reason this file was in /usr/include/bsd/sys/cdefs.h.

    The bsd version of cdefs.h did not have these constants defined.

    I removed the bsd directory and reinstalled libc6-dev.

    Everything appears to be working now.

    0 讨论(0)
提交回复
热议问题