'sf::texture' not a member of 'sf'

岁酱吖の 提交于 2019-12-12 04:39:27

问题


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

sf::Texture texture;

causes the error:

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

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


回答1:


Here you go: The SFML download page

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

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.



来源:https://stackoverflow.com/questions/21396713/sftexture-not-a-member-of-sf

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