【发布时间】:2015-03-29 01:27:26
【问题描述】:
今天我决定下载、安装并尝试使用 SFML 2.2。我还使用 MinGW 编译器下载了 Code::Blocks。我设置了所有内容并正确安装了所有内容(或者我认为是这样)并尝试运行示例代码以查看它是否可以工作:
#include <SFML/Graphics.hpp>
int main()
{
sf::RenderWindow window(sf::VideoMode(200, 200), "SFML works!");
sf::CircleShape shape(100.f);
shape.setFillColor(sf::Color::Green);
while (window.isOpen())
{
sf::Event event;
while (window.pollEvent(event))
{
if (event.type == sf::Event::Closed)
window.close();
}
window.clear();
window.draw(shape);
window.display();
}
return 0;
}
编译正确的代码虽然尝试运行它,但会出现一个错误消息框,提示“无法在动态链接库 sfml-graphics-2.dll 中找到过程入口点 _ZSt24__throw_out_of_range_fmtPKcz”。我在网上搜索但没有找到与此问题相关的任何内容,所以我来这里寻求帮助。感谢进一步的回答。
【问题讨论】: