'sf::texture' 不是 'sf' 的成员 [英] 'sf::texture' not a member of 'sf'

查看:67
本文介绍了'sf::texture' 不是 'sf' 的成员的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嘿,我刚开始修改 SFML.代码行

Hey I just started tinkering with SFML. The line of code

sf::Texture texture;

导致错误:

game.cpp:12:2: error: ‘Texture’ is not a member of ‘sf’
  sf::Texture texture;

我觉得目录/usr/includes/SFML/Graphics/应该包含一个 Texture.hpp 文件,但它没有.会是这样吗?

I feel like the directory /usr/includes/SFML/Graphics/ should contain a Texture.hpp file, Which it doesn't. Could that be it?

推荐答案

给你:SFML 下载页面

如果从源代码构建对您来说很困难,那么该页面提供了 Linux 构建.

If building from the source is overwhelming for you, that page provides a Linux build.

或者,如果您的目标是从源代码构建,您最好从 Laurent Gomila 的 SFML github 存储库.这是最佳选择,因为您将享受 2.1 版本中未包含的修复.

Or if building from the source is what you're aiming for, you'd better be taking the latest version from the Laurent Gomila's SFML github repo. This is the best option since you'll be enjoying fixes that are not included in the 2.1 version.

这篇关于'sf::texture' 不是 'sf' 的成员的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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