Intel® C++ Compiler
Community support and assistance for creating C++ code that runs on platforms based on Intel® processors.
7956 Discussions

c++ compiler error on Mac OS X 10.9

Hongxuan_Z_
Beginner
1,175 Views

When I compile the following hello world code using icpc on Mac OS X 10.9

#include<iostream>
using namespace std;

int main()
{
  cout<<"Hello World!"<<endl;
  return 0;
}

I get the following error message:

/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/clang/5.1/include/stddef.h(29): error: expression preceding parentheses of apparent call must have (pointer-to-) function type

  #if !defined(_PTRDIFF_T) || __has_feature(modules)

                              ^

/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/clang/5.1/include/stddef.h(31): error: function call is not allowed in a constant expression

  #if !__has_feature(modules)

       ^

/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/clang/5.1/include/stddef.h(37): error: function call is not allowed in a constant expression

  #if !defined(_SIZE_T) || __has_feature(modules)

                           ^

/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/clang/5.1/include/stddef.h(48): error: expression preceding parentheses of apparent call must have (pointer-to-) function type

       !defined(_RSIZE_T)) || __has_feature(modules)

                              ^

/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/clang/5.1/include/stddef.h(50): error: function call is not allowed in a constant expression

  #if !__has_feature(modules)

       ^

The version I used is Intel Composer XE 13.0.3 20130606.

0 Kudos
5 Replies
Andrey_B_Intel2
Employee
1,175 Views

Hi Hongxuan,

Apple constantly develops OS X libraries, sometimes introducing changes that make them incompatible with older compilers (both icc and clang). We update icc to make it compatible with new OS X / XCode releases, but we do so for currently supported versions only -- which is 14.0 at the moment.

If you want to continue to use icc 13.0, you have to use older OS X / XCode. If you want to switch to OS X 10.9 / XCode 5.1, you have to upgrade to icc 14.0 (or 15.0, which is currently in beta). Sorry if this is a disappointing answer...

Andrey

0 Kudos
Andrey_B_Intel2
Employee
1,175 Views

To clarify, by "supported" I mean "supported on the latest OS X / XCode releases". For OS X 10.9 / XCode 5.x this is 14.0 only. We continue to support 13.0 on older OSes / XCodes.

Andrey

0 Kudos
Hongxuan_Z_
Beginner
1,175 Views

Thanks. Where I can find the 14.0 version. The latest version I can see now is 2013_sp1.2.139. 

Andrey Bokhanko (Intel) wrote:

Hi Hongxuan,

Apple constantly develops OS X libraries, sometimes introducing changes that make them incompatible with older compilers (both icc and clang). We update icc to make it compatible with new OS X / XCode releases, but we do so for currently supported versions only -- which is 14.0 at the moment.

If you want to continue to use icc 13.0, you have to use older OS X / XCode. If you want to switch to OS X 10.9 / XCode 5.1, you have to upgrade to icc 14.0 (or 15.0, which is currently in beta). Sorry if this is a disappointing answer...

Andrey

0 Kudos
Om_S_Intel
Employee
1,175 Views

That is the right version. You may download it from Intel Registration and Download Center link https://registrationcenter.intel.com/RegCenter/Register.aspx.

 

Thanks,

 

Om

0 Kudos
Om_S_Intel
Employee
1,175 Views

The latest Intel compiler 15.0 supports Xcode 5.0 and  5.1. The release version of compiler is  available for download from Intel Registration and download center.

 

Thanks,

 

Om

0 Kudos
Reply