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 3495630
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T12:09:00+00:00 2026-05-18T12:09:00+00:00

I have a project for iPhone configured to compile for armv6 and armv7 architectures.

  • 0

I have a project for iPhone configured to compile for armv6 and armv7 architectures. And I need to exclude some code from compiling for armv6 architecture because it causes runtime crash on device (bad instruction exception).

Is there a define for armv6/armv7 compilation paths (such as “_DEBUG”)?

  • 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-18T12:09:00+00:00Added an answer on May 18, 2026 at 12:09 pm

    First off, you don’t need to prevent them from compiling, you need to prevent them from being executed. The crash is at runtime, after all, not compile time.

    That said, the easiest way to do this is to have two code paths, and compile the appropriate section based on architecture:

    #if defined _ARM_ARCH_7
    // your armv7 implementation goes here
    #elif defined _ARM_ARCH_6
    // your armv6 implementation goes here
    #elif defined __i386__
    // a simulator implementation could go here, if you had one
    #else
    #error Unknown Architecture!
    #endif
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have created an iPhone project that uses uses the ZXing bar code scanning
I have an existing iphone project with a UITabBar. Now I need styled text
I have an iPhone project in xcode that needs to be compiled for armv7
I have a fresh iPhone project. When I Build and Go: Error from Debugger:
I have a project where I need my iPhone to communicate with an Arduino.
I have a full done IPhone project. I need to localize it. First time
I have an iPhone project that displays some data of the past 24h in
In my project (iPhone app) I have a nice webview to allow users to
I currently have an iPhone project with a tab bar. On the tabbar there
I have a small iPhone Project with a UITextView on my View, designed in

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.