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答案。還是回答,問的問題,以幫助在其他情況下,他們碰上我做了同樣的問題,因爲從堆棧溢出所有的方法都不能真正解決這一特定問題