c ++程序无法在新的MacBook上编译

时间:2019-06-26 08:30:28

标签: c++ xcode compiler-errors

我最近有一台新的MacBook,并使用Apple的Migration Assistant迁移了文件。但是,C ++程序不再编译,并出现以下错误(这只是错误消息的一部分,而其余错误消息则采用相同的格式):

/Library/Developer/CommandLineTools/usr/include/c++/v1/cstdint:158:8: error: no member named 'uint8_t' in the
      global namespace
using::uint8_t;
     ~~^
/Library/Developer/CommandLineTools/usr/include/c++/v1/cstdint:159:8: error: no member named 'uint16_t' in
      the global namespace
using::uint16_t;
     ~~^
/Library/Developer/CommandLineTools/usr/include/c++/v1/cstdint:160:8: error: no member named 'uint32_t' in
      the global namespace
using::uint32_t;

使用#include<stdio.h>时,我的机器编译C程序没有问题,但是使用#include<iostream>时,会出现上述编译错误。

我尝试删除并重新安装XCode,以及此线程中的解决方案:

Can't compile C program on a Mac after upgrade to Mojave

0 个答案:

没有答案