Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Standard Libs on Mac  (Read 6681 times)

0 Members and 1 Guest are viewing this topic.

Acrobat

  • Full Member
  • ***
  • Posts: 153
    • View Profile
Standard Libs on Mac
« on: January 29, 2013, 03:24:26 pm »
Very soon my game will be released, still have questions.
I'm using some new features from C++11, and there are some problems with them on 10.6, 10.5 OSX

Errors something like :
Symbol not found : __NSConcreteGlobalBlock
Referenced from : ....
Expected in : /usr/lib/libSystem.B.dylib

Should i ship this system libraries with my application and make links correct with install_name_tool, or there are any other better ways ?

Hiura

  • SFML Team
  • Hero Member
  • *****
  • Posts: 4321
    • View Profile
    • Email
Re: Standard Libs on Mac
« Reply #1 on: January 29, 2013, 06:42:17 pm »
No, I don't think C++11 will work on this older OS. You can try but I think it won't be easy, if not simply impossible.

The thing is, if you ship LibSys with your app, you need to ship all its dependancies. I.e. :

otool -L /usr/lib/libSystem.B.dylib
/usr/lib/libSystem.B.dylib:
        /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 169.3.0)
        /usr/lib/system/libcache.dylib (compatibility version 1.0.0, current version 57.0.0)
        /usr/lib/system/libcommonCrypto.dylib (compatibility version 1.0.0, current version 50000.0.0)
        /usr/lib/system/libcompiler_rt.dylib (compatibility version 1.0.0, current version 30.0.0)
        /usr/lib/system/libcopyfile.dylib (compatibility version 1.0.0, current version 89.0.0)
        /usr/lib/system/libdispatch.dylib (compatibility version 1.0.0, current version 228.18.0)
        /usr/lib/system/libdnsinfo.dylib (compatibility version 1.0.0, current version 453.16.0)
        /usr/lib/system/libdyld.dylib (compatibility version 1.0.0, current version 210.2.3)
        /usr/lib/system/libkeymgr.dylib (compatibility version 1.0.0, current version 25.0.0)
        /usr/lib/system/liblaunch.dylib (compatibility version 1.0.0, current version 442.21.0)
        /usr/lib/system/libmacho.dylib (compatibility version 1.0.0, current version 829.0.0)
        /usr/lib/system/libquarantine.dylib (compatibility version 1.0.0, current version 52.0.0)
        /usr/lib/system/libremovefile.dylib (compatibility version 1.0.0, current version 23.1.0)
        /usr/lib/system/libsystem_blocks.dylib (compatibility version 1.0.0, current version 59.0.0)
        /usr/lib/system/libsystem_c.dylib (compatibility version 1.0.0, current version 825.24.0)
        /usr/lib/system/libsystem_dnssd.dylib (compatibility version 1.0.0, current version 1.0.0)
        /usr/lib/system/libsystem_info.dylib (compatibility version 1.0.0, current version 1.0.0)
        /usr/lib/system/libsystem_kernel.dylib (compatibility version 1.0.0, current version 2050.7.9)
        /usr/lib/system/libsystem_m.dylib (compatibility version 1.0.0, current version 1.0.0)
        /usr/lib/system/libsystem_network.dylib (compatibility version 1.0.0, current version 1.0.0)
        /usr/lib/system/libsystem_notify.dylib (compatibility version 1.0.0, current version 98.5.0)
        /usr/lib/system/libsystem_sandbox.dylib (compatibility version 1.0.0, current version 1.0.0)
        /usr/lib/system/libunc.dylib (compatibility version 1.0.0, current version 25.0.0)
        /usr/lib/system/libunwind.dylib (compatibility version 1.0.0, current version 35.1.0)
        /usr/lib/system/libxpc.dylib (compatibility version 1.0.0, current version 140.37.0)
 
SFML / OS X developer

Acrobat

  • Full Member
  • ***
  • Posts: 153
    • View Profile
Re: Standard Libs on Mac
« Reply #2 on: January 29, 2013, 09:02:10 pm »
holy f*ck  :o

Hiura

  • SFML Team
  • Hero Member
  • *****
  • Posts: 4321
    • View Profile
    • Email
Re: Standard Libs on Mac
« Reply #3 on: January 30, 2013, 12:24:12 am »
Ho, and I forgot : you also have to ship the dependencies' dependencies, and the dependencies' dependencies' dependencies, and the ... you got it ! So basically, you have to ship the OS.

Beside that, make sure you have the right to do it. (We never know with those big corporate, their © and stuff...)
SFML / OS X developer

Ceylo

  • Hero Member
  • *****
  • Posts: 2325
    • View Profile
    • http://sfemovie.yalir.org/
    • Email
Re: Standard Libs on Mac
« Reply #4 on: January 30, 2013, 01:42:24 pm »
If I were you I would forget about shipping OS dependencies.

Build your application against the SDK that matches your target OS version and ship your custom dependencies (such as SFML). If building against the SDK succeeds, then you can expect your application to run correctly on the targeted OS version without undefined symbols issues.
Want to play movies in your SFML application? Check out sfeMovie!

Acrobat

  • Full Member
  • ***
  • Posts: 153
    • View Profile
Re: Standard Libs on Mac
« Reply #5 on: January 30, 2013, 02:55:33 pm »
well, i've solved the problem already
just added to other linker flags : -weak_library /usr/lib/libSystem.B.dylib

 

anything