ICC由于配置不正确而无法用MACO编译简单的测试程序
我有一个非常简单的测试程序,该程序实际上没有做任何事情:
#include <iostream>
int main() { }
使用以下命令编译此程序会给我一个很长的错误消息:
icpc test.cpp
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/algorithm(640),
from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/__string(57),
from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/string_view(175),
from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/string(506),
from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/__locale(14),
from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/ios(215),
from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/iostream(37),
from main.cpp(1):
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/type_traits(1041): error: function call is not allowed in a constant expression
__is_function(_Tp)
^
似乎有些错误配置了,但是我无法弄清楚它是什么。
这是一些版本信息:
$ icpc --version
icpc (ICC) 19.1.3.301 20200925
Copyright (C) 1985-2020 Intel Corporation. All rights reserved.
$ /usr/bin/xcodebuild -version
Xcode 13.3.1
Build version 13E500a
$ system_profiler SPSoftwareDataType
Software:
System Software Overview:
System Version: macOS 12.3.1 (21E258)
Kernel Version: Darwin 21.4.0
Processor Name: 12-Core Intel Xeon E5
Processor Speed: 2,7 GHz
Number of Processors: 1
Total Number of Cores: 12
...
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
Intel Classic Compiler仅使用Intel®处理器对Mac*计算机提供支持。我们可以看到您正在使用MacOS和Xcode版本的不支持版本。
请从下面的链接中检查英特尔经典编译器的系统要求:
尝试使用任何支持的OS版本(MacOS* 10.15,11.0,11.2 Big Sur,12.0 Monterey)和Xcode版本(Xcode* 11.x,Xcode* 12.1,Xcode* 13.1)。
谢谢问候,
Hemanth
Intel Classic compiler does MacOS* support for Mac* computers with Intel® Processors only. We can see that you are using the Unsupported version of the MACOS and Xcode versions.
please check the system requirements of Intel Classic Compiler from the below link:
https://www.intel.com/content/www/us/en/developer/articles/system-requirements/oneapi-c-compiler-system-requirements.html
Try with any one of the supported OS versions(macOS* 10.15, 11.0,11.2 Big Sur, 12.0 Monterey) and Xcode versions(Xcode* 11.x , Xcode* 12.1, Xcode* 13.1).
Thanks & Regards,
Hemanth