1
行,所以我第一次尝试检查其他的解决方案,但他们没有工作,是啊...有两个错误,即使我直接从文档中直接看到代码。我想这可能是与文件有问题,但我不认为这会,因为文件都.HPP除非他们是否bad.I是新手所以这可能是一些愚蠢的,我错过了。苹果Mach-O的链接(ID)错误 - 连接命令退出码1失败(使用-v看到调用)C++ SFML
#include <iostream>
#include <SFML/Graphics.hpp>
int main()
{
// create the window
sf::RenderWindow window(sf::VideoMode(800, 600), "My window");
// run the program as long as the window is open
while (window.isOpen())
{
// check all the window's events that were triggered since the last iteration of the loop
sf::Event event;
while (window.pollEvent(event))
{
// "close requested" event: we close the window
if (event.type == sf::Event::Closed)
window.close();
}
// clear the window with black color
window.clear(sf::Color::Black);
// draw everything here...
// window.draw(...);
// end the current frame
window.display();
}
return 0;
}
语法没有错误,它必须是某种类型的库错误。
UPDATE FOUND答案。还是回答,问的问题,以帮助在其他情况下,他们碰上我做了同样的问题,因为从堆栈溢出所有的方法都不能真正解决这一特定问题