OSX GCC how to specify sfml library source?

前端 未结 2 2136
清酒与你
清酒与你 2021-02-10 21:03

I\'m trying to compile a project that uses sfml I installed sfml 2.1 through homebrew like below

unknown542696d2a12b:keepe         


        
2条回答
  •  深忆病人
    2021-02-10 21:21

    SFML assumes you're building a .app bundle. Notice it's complaining about not finding FreeType, which is a dependency of SFML (it's not complaining about finding SFML). And notice where it's looking for FreeType: @executable_path/../Frameworks/freetype.framework/Versions/A/freetype.

    If your program (keeper) is in ., then OS X is looking for FreeType in ./../Frameworks/freetype.framework/Versions/A/freetype, and it's complaining that it can't find it. That because those SFML libraries think you've created a .app bundle, which would then have the necessary/assumed folder structure.

    Your options are:

    • Build a .app bundle that includes everything
    • Put the dependencies (FreeType and sndfile) in the right spot manually (i.e. @executable_path/../Frameworks/freetype.framework/Versions/A/freetype)
    • Build SFML yourself and change where/how it looks for its dependencies

提交回复
热议问题