compile Boost as static Universal binary lib

前端 未结 3 1515
旧巷少年郎
旧巷少年郎 2020-12-30 16:31

I want to have a static Universal binary lib of Boost. (Preferable the latest stable version, that is 1.43.0, or newer.)

I found many Google hits with similar proble

3条回答
  •  隐瞒了意图╮
    2020-12-30 17:15

    We use Boost compiled for 10.4 here at work. We don't use GCC 4.2 on it though, rather we use GCC 4.0 as Apple's GCC 4.2 is not supported for the MacOS 10.4 SDK. To accomplish this you need a bjam user config file, eg. user-config-darwin.jam. Here's the contents of ours. Modify to your heart's content:

    # Boost.Build Configuration
    
        # Compiler configuration
    using darwin : 8.11 : /usr/bin/g++-4.0 : 
        "combined"
        "32" # this can be changed to 32_64 for 32/64 universal builds
        "10.4"
        "10.4"
    #   "/Developer"
        ""
        "" ; 
    

    Then, you need to tell bjam to use the user config jam file when compiling:

    bjam --user-config=user-config-darwin.jam ... (your other options go here) ...
    

    Now you don't have to mess with symlinks in the system SDK directories.

提交回复
热议问题