Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

amudham

macrumors newbie
Original poster
Apr 15, 2009
16
0
Hi,
I am new to Mac development, currently handling a transition of 32 bit Mac application to support both 32 and 64 bit arch.

I am using XCode3.0 to build x86_64 arch. I am successful in building the application, But When I run the application in "Snow Leopard (Build 10A190)"
getting an error "Cannot execute binary file".

I confirmed, application is x86_64 bit arch by file command.

Can anyone guess whats the issue...?

Thanks in advance.
 

robbieduncan

Moderator emeritus
Jul 24, 2002
25,611
893
Harrogate
We can't really discuss Snow Leopard here: it's covered by a NDA which you are theoretically breaking by posting this. The only thing I can think of is that you don't have a 64-bit CPU. What is your CPU as reported in About this Mac?
 

garethlewis2

macrumors 6502
Dec 6, 2006
277
1
As long as no mention of how Snow Leopard works is posted, nobody breaks the NDA. On the other hand, if you start explaining how OpenCL is implemented and want to use it, then you are breaking the NDA.
 

amudham

macrumors newbie
Original poster
Apr 15, 2009
16
0
We can't really discuss Snow Leopard here: it's covered by a NDA which you are theoretically breaking by posting this. The only thing I can think of is that you don't have a 64-bit CPU. What is your CPU as reported in About this Mac?

Here is my About this Mac Info...

Hardware Overview:

Model Name: iMac
Model Identifier: iMac7,1
Processor Name: Intel Core 2 Duo
Processor Speed: 2 GHz
Number Of Processors: 1
Total Number Of Cores: 2
L2 Cache: 4 MB
Memory: 1 GB
Bus Speed: 800 MHz
Boot ROM Version: IM71.007A.B03
SMC Version: 1.20f4
Serial Number: W873114KX85
 

amudham

macrumors newbie
Original poster
Apr 15, 2009
16
0
Hmm, OK so we have established that your machine will happily compile and run 64-bit code. Does the application you have built link against any non-built-in libraries or frameworks? If so are they 64-bit?

Yes, the application uses non-build-in libraries and yes, they too build for 64 bit.
 

robbieduncan

Moderator emeritus
Jul 24, 2002
25,611
893
Harrogate
Yes it is. All code in your address space (libraries, app, plugins) needs to be the same architecture.

Yes all libraries linked to the main executable must be 64-bit for the executable to launch (this is true for statically linked or dynamically linked libraries and frameworks). Plugins are different: a 32-bit plugin will fail to load when the main executable tries to load it, it should not prevent the main executable launching.
 

amudham

macrumors newbie
Original poster
Apr 15, 2009
16
0
Yes it is. All code in your address space (libraries, app, plugins) needs to be the same architecture.

ok Thanks!

Yes all libraries linked to the main executable must be 64-bit for the executable to launch (this is true for statically linked or dynamically linked libraries and frameworks). Plugins are different: a 32-bit plugin will fail to load when the main executable tries to load it, it should not prevent the main executable launching.

Thanks for your time!!!
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.