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

  • Home
  • SEARCH
  • 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 6068145
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T09:41:03+00:00 2026-05-23T09:41:03+00:00

My project compiles and runs OK in debug mode, but when I switch to

  • 0

My project compiles and runs OK in debug mode, but when I switch to release x86_64 compiling, I get compiler errors for attempts to setBounds using NSRect. (The errors read “incompatible type for argument 1 of setBounds”.)

There are lots of posts which I take to be suggesting to add the NS_BUILD_32_LIKE_64 macro definition above the Cocoa (Foundation) import, so that the “if NS_BUILD_32_LIKE_64” language in NSGeometry.h will be true and the necesseary typedefs will be used. So I added the macro definition to the h file of the offending class:

#define NS_BUILD_32_LIKE_64 1
#import <Cocoa/Cocoa.h>

And I still get the same compile errors.

I also tried converting explicitly from NSRect to CGRect, so that instead of this . . .

// rectIncomingSource is an NSRect
calayer.bounds = rectIncomingSource;

. . . I wrote this:

calayer.bounds = CGRectMake(rectIncomingSource.origin.x, rectIncomingSource.origin.y, rectIncomingSource.size.width, rectIncomingSource.size.height);

Same errors.

And why would setting bounds be the only problem? Per Apple docs, NSInteger and NSUInteger are the main conversion problem, and I use them all over the place, but the compiler doesn’t complain about them. So why would it choke on bounds?

I’m probably missing something really simple here — for which I apologize to the wizards. Any help for the blind?

  • 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-05-23T09:41:04+00:00Added an answer on May 23, 2026 at 9:41 am

    The target info window gave me the clue to figure this out:

    I was putting the NS_BUILD_32_LIKE_64 define in a particular class’s h file. It should have been in the prefix header file, the one with the pch extension that usually resides in the project’s “Other Sources.”

    #ifdef __OBJC__
        #define NS_BUILD_32_LIKE_64 1 // this line added
        #import <Cocoa/Cocoa.h>
    #endif
    

    Well, yeah, I suppose this was obvious. But maybe some other preprocessor neophyte will find this clarification helpful, so I won’t delete the question.

    And I still don’t understand why setting bounds should have been the only problem. Maybe something to do with core animation?

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

Sidebar

Related Questions

I have a project that compiles and runs fine on my development machine but
I use Eclipse (3.4) and my class compiles without warning or errors. My project
My project compiles and runs fine unless I try to compile my Unit Test
Eclipse compiles and runs this jsp just fine but when I deploy to Sun
I have a project set up in MonoDevelop, it compiles and runs fine for
When I press F5 the project compiles, and the new web page launches. However,
I have a WPF project which compiles just fine. However, when I enable code
I have a game code (from ioquake3 project) that compiles part of gameplay binaries
I'm trying to make my project compile under GCC (Visual Studio compiles it flawlessly).
I am working on an open source C++ project, for code that compiles on

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.