开发者

How can I get C++11 library support with the Intel compiler on Mac OSX?

I want to port a fairly large and still-growing C++ applic开发者_如何学运维ation from PC to Mac, and continue to support development in parallel on both platforms. On the PC we're using MSVC2010, and deploying a few C++11 features. On the Mac we're using XCode 4.0.2. To improve platform agnosticism and support the inline assembly we're using, we're deploying the Intel compiler on both. However, the compiler doesn't come with a library, so we're reliant on those supplied by the vendors. On the Mac, that means no C++11 library support, for features we're very keen to use such as std::forward and so on. I can't build libc++ with the Intel compiler on the Mac otherwise my problems would be solved. Is there a way around this other than rolling our own libraries?


If you really cannot switch to a different compiler on Mac, I would suggest contacting Intel's User Support, to let them know that C++11 support is important to you, and to ask them how actively they are implementing it, now that the new language is an ISO standard.

It's just possible that they may also be aware of a working library.


Clang and Intel 15 both support C++11 on Mac and Linux. Official websites describe the status of C++11 features of the Clang and Intel compilers.

On Mac, the Intel compiler uses the system C++ library, which presumably is associated with the included Clang/LLVM toolchain.

$ otool -L threads
threads:
    /usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 120.0.0)
    /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1197.1.1)

The threads program can be any program that calls a std::thread call, e.g.

#include <thread>

int main()
{
    std::thread::id id;
}
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜