Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8755251
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T13:48:56+00:00 2026-06-13T13:48:56+00:00

I’m getting a typedef redefinition error on two lines in MacTypes.h, in the following

  • 0

I’m getting a typedef redefinition error on two lines in MacTypes.h, in the following chunk of code:

#if __LP64__
typedef unsigned int                    UInt32;
typedef signed int                      SInt32;
#else
typedef unsigned long                   UInt32; // error here
typedef signed long                     SInt32; // error here
#endif

The Clang error points to the following previous definition, in CFBase.h (in CoreFoundation.framework):

#if !defined(__MACTYPES__)
#if !defined(_OS_OSTYPES_H)
typedef unsigned char           Boolean;
typedef unsigned char           UInt8;
typedef signed char             SInt8;
typedef unsigned short          UInt16;
typedef signed short            SInt16;
typedef unsigned int            UInt32; // previous definition is here
typedef signed int              SInt32; // previous definition is here
typedef uint64_t            UInt64;
typedef int64_t         SInt64;
typedef SInt32                  OSStatus;
#endif
...

This is very strange, since __LP64__ is apparently always true on the Mac platform, so why is that typedef even being evaluated? And why is there a path of compilation in which two OS-provided definitions are contradicting each other?

EDIT: Here is a screenshot of the errors in Xcode.

Xcode error output

I’ve blanked out the path of the file that includes <Carbon/Carbon.h> since it contains the name of my client (the file is the same for both errors). The full path names below that are as follows (all contained within Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks):

  • Carbon.framework/Headers/Carbon.h:20
  • CoreServices.framework/Headers/CoreServices.h:18
  • CoreServices.framework/Frameworks/AE.framework/Headers/AE.h:20
  • CoreServices.framework/Frameworks/CarbonCore.framework/Headers/CarbonCore.h:27
  • CoreServices.framework/Frameworks/CarbonCore.framework/Headers/MacTypes.h:27

Update:

In my own code, just before #include <Carbon/Carbon.h> I’ve added the following:

#if __LP64__
#error Has LP64
#else
#error Doesn't have LP64
#endif

…and I’m getting the ‘Doesn’t have LP64’ error, so this seems to be the root of the problem. However, when I compile the following in Sublime Text 2 (with SublimeClang)…

int main()
{
    #if __LP64__
    #error Has LP64
    #else
    #error Doesn't have LP64
    #endif
    return 0;
}

…I get “Has LP64”. Doing a project text search for #define __LP64__ I can’t find anything in my project, and when searching for __LP64__ it just comes up with a load of #ifs and #ifdefs. Does anyone know where this error could have come from?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T13:48:57+00:00Added an answer on June 13, 2026 at 1:48 pm

    In the end it turned out this problem was due to multiple installs of Xcode: I had recently installed Xcode 4.4 (from the App Store) and I still had an install of Xcode 3 somewhere. I solved this by running uninstall-devtools which removed Xcode 3, along with all its various paths in the Library and Developer folders. I’m not sure why conflicting installs of Xcode would cause a problem like this, but removing Xcode 3 solved it. I hope this helps anyone who has a problem like this – it’s certainly not what I expected the problem to be.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I ran into a problem. Wrote the following code snippet: teksti = teksti.Trim() teksti
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I have this code to decode numeric html entities to the UTF8 equivalent character.
I'm using v2.0 of ClassTextile.php, with the following call: $testimonial_text = $textile->TextileRestricted($_POST['testimonial']); ... and
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I have this code: - (void)parser:(NSXMLParser *)parser foundCDATA:(NSData *)CDATABlock { NSString *someString = [[NSString
I've tracked down a weird MySQL problem to the two different ways I was
Let's say I'm outputting a post title and in our database, it's Hello Y&#8217;all
I have a .ini file as follows: [playlist] numberofentries=2 File1=http://87.230.82.17:80 Title1=(#1 - 365/1400) Example

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.