问题
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