On Thu, Nov 20, 2008 at 7:43 AM, Shawn Erickson <[EMAIL PROTECTED]> wrote:
> The decision between 64b and 32b is made at compile time for your
> compiled code. As a result your 64b executable wont run under the 32b
> runtime not matter what you do.
>
> ...however you can of course (normally you would do this) create a
> universal application that contains x86-64, x86, etc. in it and at
> launch time the OS can decide which to run based on the systems
> capabilities.

But if I create a universal project with both x86-64 and i386 code and
run the application on a 32-bit system, is it possible to detect in
the code that I'm running the 32-bit ABI? E.g. if an exception is
thrown in the 32-bit code all C++ resources will be leaked and in an
unknown state at the time I catch the exception and I will need to
make some  "emergency exit" but in the 64-bit version all resources
have been cleaned up correctly by the destructors and the program will
be in a clean and known state. It would be nice to know in the same
Objecive-C++ file (by some runtime check) if the program can proceed
and handle the error or need to abort and possibly throw away e.g.
unsaved data.

Also, on a 64-bit capable system, will the x86-64 version always be
choosen when launching?

/ Påhl
_______________________________________________

Cocoa-dev mailing list ([email protected])

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to