C ++ SFML获得白色矩形而不是绿色圆圈

时间:2019-01-18 00:01:04

标签: c++ sfml

使用VS 2017和SFML 2.5.1,我按照安装说明进行操作,并使用了教程here中给出的代码。我看到“ SFML Works!”的窗口。但是我没有画一个绿色的圆圈,而是得到了一个白色的盒子: enter image description here

我关闭应用程序后的输出如下:

test
 'SFMLTutorial.exe' (Win32): Loaded 'C:\Users\userName\source\repos\SFMLTutorial\Debug\SFMLTutorial.exe'. Symbols loaded.
'SFMLTutorial.exe' (Win32): Loaded 'C:\Windows\SysWOW64\ntdll.dll'. Symbols loaded.

'SFMLTutorial.exe' (Win32): Loaded 'C:\Windows\SysWOW64\kernel32.dll'. Symbols loaded.
'SFMLTutorial.exe' (Win32): Loaded 'C:\Windows\SysWOW64\KernelBase.dll'. Symbols loaded.
'SFMLTutorial.exe' (Win32): Loaded 'C:\Users\userName\source\repos\SFMLTutorial\Debug\sfml-system-d-2.dll'. Cannot find or open the PDB file.
'SFMLTutorial.exe' (Win32): Loaded 'C:\Windows\SysWOW64\msvcp140d.dll'. Symbols loaded.
'SFMLTutorial.exe' (Win32): Loaded 'C:\Windows\SysWOW64\vcruntime140d.dll'. Symbols loaded.
'SFMLTutorial.exe' (Win32): Loaded 'C:\Windows\SysWOW64\winmm.dll'. Symbols loaded.
'SFMLTutorial.exe' (Win32): Loaded 'C:\Users\userName\source\repos\SFMLTutorial\Debug\sfml-window-d-2.dll'. Cannot find or open the PDB file.
'SFMLTutorial.exe' (Win32): Loaded 'C:\Windows\SysWOW64\gdi32.dll'. Symbols loaded.
'SFMLTutorial.exe' (Win32): Loaded 'C:\Windows\SysWOW64\gdi32full.dll'. Symbols loaded.
'SFMLTutorial.exe' (Win32): Loaded 'C:\Windows\SysWOW64\msvcrt.dll'. Symbols loaded.
'SFMLTutorial.exe' (Win32): Loaded 'C:\Windows\SysWOW64\ucrtbased.dll'. Symbols loaded.
'SFMLTutorial.exe' (Win32): Loaded 'C:\Windows\SysWOW64\winmmbase.dll'. Symbols loaded.
'SFMLTutorial.exe' (Win32): Loaded 'C:\Windows\SysWOW64\cfgmgr32.dll'. Symbols loaded.
'SFMLTutorial.exe' (Win32): Loaded 'C:\Windows\SysWOW64\msvcp_win.dll'. Symbols loaded.
'SFMLTutorial.exe' (Win32): Loaded 'C:\Windows\SysWOW64\ucrtbase.dll'. Symbols loaded.
'SFMLTutorial.exe' (Win32): Loaded 'C:\Windows\SysWOW64\user32.dll'. Symbols loaded.
'SFMLTutorial.exe' (Win32): Loaded 'C:\Windows\SysWOW64\win32u.dll'. Symbols loaded.
'SFMLTutorial.exe' (Win32): Loaded 'C:\Windows\SysWOW64\ucrtbase.dll'. Symbols loaded.
'SFMLTutorial.exe' (Win32): Unloaded 'C:\Windows\SysWOW64\ucrtbase.dll'
'SFMLTutorial.exe' (Win32): Loaded 'C:\Windows\SysWOW64\advapi32.dll'. Symbols loaded.
'SFMLTutorial.exe' (Win32): Loaded 'C:\Users\userName\source\repos\SFMLTutorial\Debug\sfml-graphics-d-2.dll'. Cannot find or open the PDB file.
'SFMLTutorial.exe' (Win32): Loaded 'C:\Windows\SysWOW64\opengl32.dll'. Symbols loaded.
'SFMLTutorial.exe' (Win32): Loaded 'C:\Windows\SysWOW64\sechost.dll'. Symbols loaded.
'SFMLTutorial.exe' (Win32): Loaded 'C:\Windows\SysWOW64\rpcrt4.dll'. Symbols loaded.
'SFMLTutorial.exe' (Win32): Loaded 'C:\Windows\SysWOW64\glu32.dll'. Symbols loaded.
'SFMLTutorial.exe' (Win32): Loaded 'C:\Windows\SysWOW64\opengl32.dll'. Symbols loaded.
'SFMLTutorial.exe' (Win32): Unloaded 'C:\Windows\SysWOW64\opengl32.dll'
'SFMLTutorial.exe' (Win32): Loaded 'C:\Windows\SysWOW64\sspicli.dll'. Symbols loaded.
'SFMLTutorial.exe' (Win32): Loaded 'C:\Windows\SysWOW64\cryptbase.dll'. Symbols loaded.
'SFMLTutorial.exe' (Win32): Loaded 'C:\Windows\SysWOW64\bcryptprimitives.dll'. Symbols loaded.
'SFMLTutorial.exe' (Win32): Loaded 'C:\Windows\SysWOW64\ucrtbased.dll'. Symbols loaded.
'SFMLTutorial.exe' (Win32): Unloaded 'C:\Windows\SysWOW64\ucrtbased.dll'
'SFMLTutorial.exe' (Win32): Loaded 'C:\Windows\SysWOW64\imm32.dll'. Symbols loaded.
'SFMLTutorial.exe' (Win32): Loaded 'C:\Windows\SysWOW64\combase.dll'. Symbols loaded.
'SFMLTutorial.exe' (Win32): Loaded 'C:\Program Files (x86)\Avecto\Privilege Guard Client\PGHook.dll'. Cannot find or open the PDB file.
'SFMLTutorial.exe' (Win32): Loaded 'C:\Windows\SysWOW64\cryptsp.dll'. Symbols loaded.
'SFMLTutorial.exe' (Win32): Loaded 'C:\Windows\SysWOW64\rsaenh.dll'. Symbols loaded.
'SFMLTutorial.exe' (Win32): Loaded 'C:\Windows\SysWOW64\bcrypt.dll'. Symbols loaded.
'SFMLTutorial.exe' (Win32): Loaded 'C:\Windows\SysWOW64\psapi.dll'. Symbols loaded.
'SFMLTutorial.exe' (Win32): Loaded 'C:\Program Files\Cylance\Desktop\CyMemDef.dll'. Cannot find or open the PDB file.
'SFMLTutorial.exe' (Win32): Loaded 'C:\Program Files\Cylance\Desktop\CyKNPHDOJQHQZ.dll'. Cannot find or open the PDB file.
'SFMLTutorial.exe' (Win32): Loaded 'C:\Program Files\Cylance\Desktop\CyNTFMIHYBLXA.dll'. Cannot find or open the PDB file.
'SFMLTutorial.exe' (Win32): Loaded 'C:\Windows\SysWOW64\uxtheme.dll'. Symbols loaded.
'SFMLTutorial.exe' (Win32): Loaded 'C:\Windows\SysWOW64\msctf.dll'. Symbols loaded.
'SFMLTutorial.exe' (Win32): Loaded 'C:\Windows\SysWOW64\oleaut32.dll'. Symbols loaded.
'SFMLTutorial.exe' (Win32): Loaded 'C:\Program Files (x86)\Common Files\microsoft shared\ink\tiptsf.dll'. Symbols loaded.
'SFMLTutorial.exe' (Win32): Loaded 'C:\Windows\System32\DriverStore\FileRepository\igdlh64.inf_amd64_8c587880ddec6926\ig9icd32.dll'. Cannot find or open the PDB file.
'SFMLTutorial.exe' (Win32): Unloaded 'C:\Windows\System32\DriverStore\FileRepository\igdlh64.inf_amd64_8c587880ddec6926\ig9icd32.dll'
'SFMLTutorial.exe' (Win32): Loaded 'C:\Windows\System32\DriverStore\FileRepository\igdlh64.inf_amd64_8c587880ddec6926\ig9icd32.dll'. Cannot find or open the PDB file.
'SFMLTutorial.exe' (Win32): Loaded 'C:\Windows\SysWOW64\shell32.dll'. Symbols loaded.
'SFMLTutorial.exe' (Win32): Loaded 'C:\Windows\SysWOW64\SHCore.dll'. Symbols loaded.
'SFMLTutorial.exe' (Win32): Loaded 'C:\Windows\SysWOW64\windows.storage.dll'. Symbols loaded.
'SFMLTutorial.exe' (Win32): Loaded 'C:\Windows\SysWOW64\shlwapi.dll'. Symbols loaded.
'SFMLTutorial.exe' (Win32): Loaded 'C:\Windows\SysWOW64\kernel.appcore.dll'. Symbols loaded.
'SFMLTutorial.exe' (Win32): Loaded 'C:\Windows\SysWOW64\powrprof.dll'. Symbols loaded.
'SFMLTutorial.exe' (Win32): Loaded 'C:\Windows\SysWOW64\profapi.dll'. Symbols loaded.
'SFMLTutorial.exe' (Win32): Loaded 'C:\Windows\SysWOW64\wtsapi32.dll'. Symbols loaded.
'SFMLTutorial.exe' (Win32): Loaded 'C:\Windows\SysWOW64\dwmapi.dll'. Symbols loaded.
'SFMLTutorial.exe' (Win32): Loaded 'C:\Windows\SysWOW64\version.dll'. Symbols loaded.
'SFMLTutorial.exe' (Win32): Unloaded 'C:\Windows\SysWOW64\version.dll'
'SFMLTutorial.exe' (Win32): Loaded 'C:\Windows\System32\DriverStore\FileRepository\igdlh64.inf_amd64_8c587880ddec6926\igc32.dll'. Cannot find or open the PDB file.
'SFMLTutorial.exe' (Win32): Unloaded 'C:\Windows\System32\DriverStore\FileRepository\igdlh64.inf_amd64_8c587880ddec6926\igc32.dll'
'SFMLTutorial.exe' (Win32): Loaded 'C:\Windows\System32\DriverStore\FileRepository\igdlh64.inf_amd64_8c587880ddec6926\igc32.dll'. Cannot find or open the PDB file.
'SFMLTutorial.exe' (Win32): Loaded 'C:\Windows\SysWOW64\dinput8.dll'. Symbols loaded.
'SFMLTutorial.exe' (Win32): Loaded 'C:\Windows\SysWOW64\InputHost.dll'. Symbols loaded.
'SFMLTutorial.exe' (Win32): Loaded 'C:\Windows\SysWOW64\CoreMessaging.dll'. Symbols loaded.
'SFMLTutorial.exe' (Win32): Loaded 'C:\Windows\SysWOW64\CoreUIComponents.dll'. Symbols loaded.
'SFMLTutorial.exe' (Win32): Loaded 'C:\Windows\SysWOW64\ntmarta.dll'. Symbols loaded.
'SFMLTutorial.exe' (Win32): Loaded 'C:\Windows\SysWOW64\WinTypes.dll'. Symbols loaded.
'SFMLTutorial.exe' (Win32): Loaded 'C:\Windows\SysWOW64\hid.dll'. Symbols loaded.
'SFMLTutorial.exe' (Win32): Loaded 'C:\Windows\SysWOW64\setupapi.dll'. Symbols loaded.
'SFMLTutorial.exe' (Win32): Loaded 'C:\Windows\SysWOW64\devobj.dll'. Symbols loaded.
'SFMLTutorial.exe' (Win32): Loaded 'C:\Windows\SysWOW64\wintrust.dll'. Symbols loaded.
'SFMLTutorial.exe' (Win32): Loaded 'C:\Windows\SysWOW64\msasn1.dll'. Symbols loaded.
'SFMLTutorial.exe' (Win32): Loaded 'C:\Windows\SysWOW64\crypt32.dll'. Symbols loaded.
'SFMLTutorial.exe' (Win32): Loaded 'C:\Windows\SysWOW64\TextInputFramework.dll'. Symbols loaded.
'SFMLTutorial.exe' (Win32): Loaded 'C:\Windows\SysWOW64\clbcatq.dll'. Symbols loaded.
'SFMLTutorial.exe' (Win32): Loaded 'C:\Windows\SysWOW64\UIAutomationCore.dll'. Symbols loaded.
onecore\com\combase\inc\comcataloghelpers.hpp(67)\combase.dll!753F0530: (caller: 753F02C0) ReturnHr(1) tid(3efc) 80004002 No such interface supported
'SFMLTutorial.exe' (Win32): Loaded 'C:\Windows\SysWOW64\sxs.dll'. Symbols loaded.
mincore\com\oleaut32\dispatch\ups.cpp(2125)\OLEAUT32.dll!75CD239F: (caller: 75CD1F41) ReturnHr(1) tid(3cf4) 8002801D Library not registered.
mincore\com\oleaut32\dispatch\ups.cpp(2125)\OLEAUT32.dll!75CD239F: (caller: 75CD1F41) ReturnHr(2) tid(3cf4) 8002801D Library not registered.
'SFMLTutorial.exe' (Win32): Loaded 'C:\Windows\SysWOW64\oleacc.dll'. Symbols loaded.
'SFMLTutorial.exe' (Win32): Loaded 'C:\Windows\SysWOW64\twinapi.dll'. Symbols loaded.
'SFMLTutorial.exe' (Win32): Loaded 'C:\Windows\SysWOW64\twinapi.appcore.dll'. Symbols loaded.
'SFMLTutorial.exe' (Win32): Loaded 'C:\Windows\SysWOW64\rmclient.dll'. Symbols loaded.
'SFMLTutorial.exe' (Win32): Loaded 'C:\Windows\SysWOW64\ole32.dll'. Symbols loaded.
'SFMLTutorial.exe' (Win32): Loaded 'C:\Windows\SysWOW64\dxgi.dll'. Symbols loaded.
'SFMLTutorial.exe' (Win32): Loaded 'C:\Windows\SysWOW64\d3d11.dll'. Symbols loaded.
'SFMLTutorial.exe' (Win32): Loaded 'C:\Windows\SysWOW64\ResourcePolicyClient.dll'. Symbols loaded.
'SFMLTutorial.exe' (Win32): Unloaded 'C:\Windows\SysWOW64\ResourcePolicyClient.dll'
The thread 0x3efc has exited with code -1073741510 (0xc000013a).
The thread 0x1ff8 has exited with code -1073741510 (0xc000013a).
The thread 0x3cf4 has exited with code -1073741510 (0xc000013a).
The thread 0x3c1c has exited with code -1073741510 (0xc000013a).
The thread 0x1e50 has exited with code -1073741510 (0xc000013a).
The thread 0x3c9c has exited with code -1073741510 (0xc000013a).
The thread 0x3e98 has exited with code -1073741510 (0xc000013a).
The thread 0x3f68 has exited with code -1073741510 (0xc000013a).
The thread 0x3ebc has exited with code -1073741510 (0xc000013a).
The thread 0x3ea4 has exited with code -1073741510 (0xc000013a).
The thread 0x3f58 has exited with code -1073741510 (0xc000013a).
The thread 0x360c has exited with code -1073741510 (0xc000013a).
The thread 0x3dd4 has exited with code -1073741510 (0xc000013a).
The thread 0x3b1c has exited with code -1073741510 (0xc000013a).
The thread 0x392c has exited with code -1073741510 (0xc000013a).
The program '[15600] SFMLTutorial.exe' has exited with code -1073741510 (0xc000013a).

源代码(复制/粘贴)在这里:

#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;
}

我应该得到一个绿色圆圈。对我可能做错的事情有任何想法吗?

0 个答案:

没有答案