Can't get real path for source - Xcode, SFML, C++

江枫思渺然 提交于 2020-01-22 16:32:05

问题


I am new to SFML, and followed SFML & Xcode tutorials for SFML 2.5 to try to get a basic program build and run.

After copying the content of Frameworks to /Library/Frameworks and content of extlibs to /Library/Frameworks, and the Xcode templates, I was able to create a sample app via Xcode using the SFML App template.

When I tried to build it, it failed with the following error:

Any idea what I did wrong?

Help is much appreciated!


回答1:


Seems like a post build script is pointing to incorrect paths. Here's how to fix this.

In Xcode click on your project's name in the root of the project navigator (where you see the source files) so you can see its configuration.

There should be a header called "build phases". Click on that.

Expand the item called "Run Script".

If you followed the tutorials from SFML to setup your environment, edit the area under the comment "Settings" at the top of the script to look like this.

#These 3 are probably pointing to a directory under 
#/Users/SFML right now which is not on our machines
SFML_DEPENDENCIES_INSTALL_PREFIX="/Library/Frameworks"
CMAKE_INSTALL_FRAMEWORK_PREFIX="/Library/Frameworks"
CMAKE_INSTALL_LIB_PREFIX="/usr/local/lib"

#This Doesn't Change
FRAMEWORKS_FULL_PATH="$BUILT_PRODUCTS_DIR/$FRAMEWORKS_FOLDER_PATH/"


来源:https://stackoverflow.com/questions/53325026/cant-get-real-path-for-source-xcode-sfml-c

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!