SnowLeopard 64bit application not running.

Discussion in 'Mac Programming' started by amudham, Apr 15, 2009.

  1. macrumors newbie

    Joined:
    Apr 15, 2009
    #1
    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.
     
  2. Moderator emeritus

    robbieduncan

    Joined:
    Jul 24, 2002
    Location:
    London
    #2
    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?
     
  3. macrumors 6502

    Joined:
    Dec 6, 2006
    #3
    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.
     
  4. macrumors 68030

    gibbz

    Joined:
    May 31, 2007
    Location:
    National Weather Center
    #4
    It would be nice if this thought were consistent when talking about the iPhone OS 3.0 beta.
     
  5. Moderator emeritus

    robbieduncan

    Joined:
    Jul 24, 2002
    Location:
    London
    #5
    Yes, it certainly would, but this is moving rapidly off-topic!
     
  6. thread starter macrumors newbie

    Joined:
    Apr 15, 2009
    #6
    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
     
  7. Moderator emeritus

    robbieduncan

    Joined:
    Jul 24, 2002
    Location:
    London
    #7
    Well you have a 64-bit CPU. Can you build a simple, stand-alone executable in 64-bit mode? Something like Hello World?
     
  8. thread starter macrumors newbie

    Joined:
    Apr 15, 2009
    #8
    Hello World.. works fine.
     
  9. Moderator emeritus

    robbieduncan

    Joined:
    Jul 24, 2002
    Location:
    London
    #9
    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?
     
  10. thread starter macrumors newbie

    Joined:
    Apr 15, 2009
    #10
    Yes, the application uses non-build-in libraries and yes, they too build for 64 bit.
     
  11. Moderator emeritus

    robbieduncan

    Joined:
    Jul 24, 2002
    Location:
    London
    #11
    Then I'm out of suggestions...
     
  12. thread starter macrumors newbie

    Joined:
    Apr 15, 2009
    #12
    Tel me one thing.. is that true, we need all libraries as well to be build for 64? in order to run in 64bit arch?
     
  13. macrumors 68030

    Catfish_Man

    Joined:
    Sep 13, 2001
    Location:
    Portland, OR
    #13
    Yes it is. All code in your address space (libraries, app, plugins) needs to be the same architecture.
     
  14. Moderator emeritus

    robbieduncan

    Joined:
    Jul 24, 2002
    Location:
    London
    #14
    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.
     
  15. thread starter macrumors newbie

    Joined:
    Apr 15, 2009
    #15
    ok Thanks!

    Thanks for your time!!!
     

Share This Page