如何将图像添加到 Xcode 中的 C++ 项目 [英] How to add an image to a C++ project in Xcode

查看:24
本文介绍了如何将图像添加到 Xcode 中的 C++ 项目的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在 Xcode 中向我的 C++ 项目添加一个图像,以便我可以读取该图像并对其进行处理.如何将图像包含到我的项目中?

I would like to add an image to my C++ project in Xcode so that I can read that image and do something with it. How do I include the image into my project?

尝试将其复制粘贴到我的项目和包含我的 C++ 源代码的文件夹中.

tried copy pasting both into my project and into the folder with my c++ source.

推荐答案

将图像与可执行文件放在同一文件夹中,即产品文件夹中的文件.

Put the image in the same folder with the executable i.e. with the file in the Products folder.

这篇关于如何将图像添加到 Xcode 中的 C++ 项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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