【发布时间】:2018-10-28 19:39:26
【问题描述】:
我在编译单个脚本时遇到问题。 我使用 SublimeText 和 MinGW 编译器。我输入了所有的 SFML 库。
这是代码:
#include <SFML/Graphics.hpp>
#include <time.h>
using namespace sf;
int main()
{
RenderWindow window(VideoMode(453,453),"Sachy");
Texture t1;
t1.loadFromFile("images/figures.png");
Sprite s(t1);
while(window.isOpen())
{
Event e;
while(window.pollEvent(e))
{
if(e.type == Event::Closed)
window.close();
}
window.clear();
window.draw(s);
window.display();
}
}
然后在 cmd.exe 中运行:
g++ main.cpp -static-libgcc -lsfml-graphics -lsfml-window -lsfml-system
编译没有错误。当尝试启动 a.exe 时显示此错误:
The code could not be started because libgcc_s_sjlj-1.dll was not found. Try to resolve this problem by reinstalling the program
【问题讨论】:
标签: mingw sublimetext sfml