0
我想建立簡單的項目構建SFML項目: G ++ main.cpp中-I./include -L./lib -o主要-lsfml-:問題與MinGW的
////////////////////////////////////
// Headers
////////////////////////////////////////////////////////////
#include <SFML/Window.hpp>
#define SFML_DYNAMIC
////////////////////////////////////////////////////////////
/// Entry point of application
///
/// \return Application exit code
///
////////////////////////////////////////////////////////////
int main()
{
// Create the main window
sf::Window App(sf::VideoMode(800, 600, 32), "SFML Window");
// Start main loop
bool Running = true;
while (Running)
{
App.Display();
}
return EXIT_SUCCESS;
}
我建立它系統-lsfml-window -static-libgcc。 一切編譯沒有誤差修改,但是當我運行它看起來:
我嘗試建立具有: -lopengl32 -lglu3s 沒有-static-libgcc中和#SFML_DYNAMICS 很多組合,但我得到了同樣的結果:黑色命令窗口而不是帶有圖形的普通窗口。 我使用SFML 1.6和gcc 4.5.2(我有同樣的問題3 ...版本:/) 任何人都知道我做錯了什麼?或者如何編譯它?我知道我可以嘗試視覺工作室,但我想用海灣合作委員會。
這個簡單的代碼http://pastebin.com/BiEs92Ri工作良好:/但是當我嘗試運行與窗口的例子,它不是appaer – piotrek 2011-04-09 21:02:11