无法获得源代码的真实路径 - Xcode、SFML、C++ [英] Can't get real path for source - Xcode, SFML, C++

查看:53
本文介绍了无法获得源代码的真实路径 - Xcode、SFML、C++的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是 SFML 的新手,并且关注了 SFML &SFML 2.5 的 Xcode 教程,尝试构建和运行基本程序.

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

将 Frameworks 的内容复制到 /Library/Frameworks 并将 extlibs 的内容复制到 /Library/Frameworks 和 Xcode 模板后,我能够创建一个示例使用 SFML 应用模板通过 Xcode 开发应用.

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:

知道我做错了什么吗?

非常感谢您的帮助!

推荐答案

似乎后构建脚本指向了不正确的路径.以下是解决此问题的方法.

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

在 Xcode 中,在项目导航器的根目录(您可以看到源文件)中单击您的项目名称,以便查看其配置.

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".

如果您按照 SFML 中的教程设置环境,请编辑脚本顶部注释设置"下的区域,使其看起来像这样.

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/"

这篇关于无法获得源代码的真实路径 - Xcode、SFML、C++的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆