Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/visual-studio-2010/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
VS 2010和SFML:window.display()上的访问冲突问题 我最近开始在Visual C++ 2010上使用SFML。我已经链接了所有库并包含了所有必需的文件,但当我运行main.cpp时,编译器仍会抛出一个未处理的异常,即_C++_Visual Studio 2010_Sfml - Fatal编程技术网

VS 2010和SFML:window.display()上的访问冲突问题 我最近开始在Visual C++ 2010上使用SFML。我已经链接了所有库并包含了所有必需的文件,但当我运行main.cpp时,编译器仍会抛出一个未处理的异常,即

VS 2010和SFML:window.display()上的访问冲突问题 我最近开始在Visual C++ 2010上使用SFML。我已经链接了所有库并包含了所有必需的文件,但当我运行main.cpp时,编译器仍会抛出一个未处理的异常,即,c++,visual-studio-2010,sfml,C++,Visual Studio 2010,Sfml,SFML.exe中0x00000000处未处理的异常:0xC0000005:访问冲突执行位置0x00000000 我的节目: #include <SFML/Graphics.hpp> int main() { sf::RenderWindow window(sf::VideoMode(200, 200), "SFML works!"); sf::CircleShape shape(100.f); shape.setFillColor(sf::Color::G

SFML.exe中0x00000000处未处理的异常:0xC0000005:访问冲突执行位置0x00000000

我的节目:

#include <SFML/Graphics.hpp>

int main()
{
    sf::RenderWindow window(sf::VideoMode(200, 200), "SFML works!");
    sf::CircleShape shape(100.f);
    shape.setFillColor(sf::Color::Green);

    while (window.isOpen())
    {
        sf::Event event;
        while (window.pollEvent(event))
        {
            if (event.type == sf::Event::Closed)
                window.close();
        }

        //window.clear();
        window.draw(shape);
        window.display();
    }

    return 0;
}

崩溃是否总是发生,或者只有在关闭窗口时才会发生?是否在正确的位置有library.dll,以便.exe可以访问它们?在opencv中工作时,我也遇到过类似的外观错误,dll丢失。是的,崩溃总是发生。同样的代码在我的办公机器中工作正常。但在我的家用笔记本电脑中,这种奇怪的问题发生了。令人惊讶的是,当我试图在office机器上远程运行相同的程序时,同样的问题也会发生。我缺少什么?我已将所有必需的DLL放在.exe文件夹中。你确定没有混合调试/发布库吗?我见过这种情况在混血儿中发生。