Can't include carbon headers during compilation of GCC on Yosemite?

Before updating my OS and XCode to Yosemite, I used to include the Carbon header from the C ++ file when compiling with gcc without error:

#include <Carbon/Carbon.h>
int main()
{
  return 0;
}

      

Now, on Yosemite, this will compile with clang++

, but not with g++

(4.7 installed via macports):

In file included from /usr/include/dispatch/dispatch.h:51:0,
                 from /System/Library/Frameworks/CoreFoundation.framework/Headers/CFStream.h:15,
                 from /System/Library/Frameworks/CoreFoundation.framework/Headers/CFPropertyList.h:13,
                 from /System/Library/Frameworks/CoreFoundation.framework/Headers/CoreFoundation.h:55,
                 from /System/Library/Frameworks/CoreServices.framework/Headers/CoreServices.h:19,
                 from /System/Library/Frameworks/Carbon.framework/Headers/Carbon.h:20,
                 from ./test.cpp.cpp:39:
/usr/include/dispatch/object.h:143:15: error: expected unqualified-id before '^' token
/usr/include/dispatch/object.h:143:15: error: expected ')' before '^' token
/usr/include/dispatch/object.h:362:3: error: 'dispatch_block_t' has not been declared

      

Is it not possible to include Carbon headers when compiling with GCC?

+3


source to share


1 answer


I think Carbon only has 32 bits and your GCC does it in 64 bits initially, try with -m32



0


source







All Articles