0

We are trying to make conversion of our c++ code from 32-Bit to 64-Bit. This conversion is to support for new MAC OS 10.14 which is to be released in September 2018 which supports only 64-Bit applications.

As of now, If we run 'file' command on our binary its showing below result.

$ file <my_cpp_binary>
$ my_cpp_binary: Mach-0 executable i386

How can we convert my code to support only for 64-Bit architecture? What changes we have to do in our code? How to make my binary to show executable as only 64bit instead of i386 when we execute file command?

Tejaswi Burgula
  • 329
  • 3
  • 14
  • 1
    Go to the Build Settings for the project output and select `Standard Architectures (64-bit intel)` for the build target's `Architectures`, rather than whatever setting is currently there. But that's probably just the beginning – Anya Shenanigans Jun 11 '18 at 10:57
  • Hi, So don't we need to do any changes in the code? – Tejaswi Burgula Jun 18 '18 at 13:01
  • No, that's just the first step. It *might* be enough, but rarely is. You should read [the 64bit transition guide](https://developer.apple.com/library/archive/documentation/Darwin/Conceptual/64bitPorting/intro/intro.html) to help in the porting work. – Anya Shenanigans Jun 18 '18 at 13:03
  • Just to clarify, Mojave will be the last version of macOS that **does** support running 32-bit apps (although it will warn users). It is **not** the first that *won't* run 32-bit apps. – Ken Thomases Jun 24 '18 at 19:20

1 Answers1

0

You need to also make sure that dependent libraries are also 64 bit and if you are using a new 64 bit library then you might need to pass macros as you would be using new library's headers and also new library might have code specific to 64 bit specific macros.