command-line library build fails with linker error

前端 未结 2 1188
温柔的废话
温柔的废话 2020-12-18 07:03

I am getting a library not found error building GraphViz current release (June 7 2012) with Xcode 4.3 using a script. I may have made mistakes updating build script

2条回答
  •  半阙折子戏
    2020-12-18 07:36

    If I remember correctly this is what fixed the library not found problem.

    CFLAGS="$(OTHER_CFLAGS) -miphoneos-version-min=5.0"
    LDFLAGS="$(OTHER_LDFLAGS) --miphoneos-version-min=5.0"
    

    To link this to Xcode, under Build Settings then Header and Library search paths you need to add the paths to the built versions of the library and the header.

    You can add the build script as part of your Xcode project, but I haven't had success with this, plus you should only need to build it once per version, so putting the time into anything other than a build script doesn't have much return.

    If you decide to put the script in your project anyway (good luck!), then go to the build phases tab, add a build phase of type "Run Script" and paste your script there.

提交回复
热议问题