Kan*_*rKK 6 c++ macos xcode macos-high-sierra
我可以在安装 High sierra Update 10.13.1 之前成功 make 我的 make 文件具有以下配置:
CC = g++-7
CFLAGS = -Wall -O3 -fopenmp -Igzstream -Isrc -Isrc/models -std=c++0x
LDFLAGS = -lgomp -lgzstream -lz -lstdc++ -Lgzstream
Run Code Online (Sandbox Code Playgroud)
抛出的错误是:
In file included from /usr/include/stdio.h:65:0,
from <REDACTED>,
from <REDACTED>:
/usr/include/zlib.h:663:46: error: expected initializer before '__AVAILABILITY_INTERNAL__MAC_10_13'
__OSX_AVAILABLE_STARTING(__MAC_10_13,__IPHONE_11_0);
^
Run Code Online (Sandbox Code Playgroud)
仔细查看第 663 行的 zlib.h:
ZEXTERN int ZEXPORT deflateGetDictionary OF((z_streamp strm,
Bytef *dictionary,
uInt *dictLength))
__OSX_AVAILABLE_STARTING(__MAC_10_13,__IPHONE_11_0);
Run Code Online (Sandbox Code Playgroud)
有多行抛出相同的错误,它们都带有 __OSX_AVAILABLE_STARTING 我不知道如何解决这个问题。我使用重新安装了 xcode 命令行工具xcode-select --install
| 归档时间: |
|
| 查看次数: |
1477 次 |
| 最近记录: |