尝试创建窗口时SFML SIGSEGV错误

时间:2013-08-17 20:03:14

标签: c++ sfml sigsegv

我昨天将我的sfml从1.6升级到2.1,在移植旧项目之后,我发现这段代码(即使将整个项目简化为仅使用这两条指令的int main()之后)也会产生SIGSEGV错误:

int main(){
    sf::RenderWindow* window;

    //this V SIGSEGVs
    window = new sf::RenderWindow(sf::VideoMode(1024, 768), "app", sf::Style::Fullscreen);
    delete window;
}

我使用Code :: Blocks \ MinGw。

任何sugestions我该怎么做才能修复它?

编辑: 是崩溃的窗口创建指令。 在编译整个项目的代码时,我收到了以下警告:

warning: auto-importing has been activated without --enable-auto-import specified on the command line.
||Info: resolving vtable for sf::Sprite by linking to __imp___ZTVN2sf6SpriteE |
||Info: resolving sf::RenderStates::Default      by linking to __imp___ZN2sf12RenderStates7DefaultE |
||Info: resolving vtable for sf::Transformable by linking to __imp___ZTVN2sf13TransformableE 

0 个答案:

没有答案