我目前正在研究2D游戏,作为我其中一门课程的作业,我在Visual Studio community 2017中使用SFML(openGL库)。我正在调试Win32系统。我将头文件,所有必需的库链接在一起,并将预处理器连接到SFML_STATIC。我尝试构建我从sfml-dev.org获得的示例程序:
#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;
}
而且我不断收到这些错误:
'FinalSpace.exe' (Win32): Loaded 'C:\Users\Mo'men\Desktop\GUC\Semester 5\Graphics\Assignment 1\FinalSpace\Debug\FinalSpace.exe'. Symbols loaded.
'FinalSpace.exe' (Win32): Loaded 'C:\Windows\SysWOW64\ntdll.dll'. Cannot find or open the PDB file.
'FinalSpace.exe' (Win32): Loaded 'C:\Windows\SysWOW64\kernel32.dll'. Cannot find or open the PDB file.
'FinalSpace.exe' (Win32): Loaded 'C:\Windows\SysWOW64\KernelBase.dll'. Cannot find or open the PDB file.
'FinalSpace.exe' (Win32): Loaded 'C:\Windows\SysWOW64\sfml-window-2.dll'. Module was built without symbols.
'FinalSpace.exe' (Win32): Loaded 'C:\Windows\SysWOW64\gdi32.dll'. Cannot find or open the PDB file.
'FinalSpace.exe' (Win32): Loaded 'C:\Windows\SysWOW64\gdi32full.dll'. Cannot find or open the PDB file.
'FinalSpace.exe' (Win32): Loaded 'C:\Windows\SysWOW64\msvcp_win.dll'. Cannot find or open the PDB file.
'FinalSpace.exe' (Win32): Loaded 'C:\Windows\SysWOW64\ucrtbase.dll'. Cannot find or open the PDB file.
'FinalSpace.exe' (Win32): Loaded 'C:\Windows\SysWOW64\user32.dll'. Cannot find or open the PDB file.
'FinalSpace.exe' (Win32): Loaded 'C:\Windows\SysWOW64\msvcp140d.dll'. Cannot find or open the PDB file.
'FinalSpace.exe' (Win32): Loaded 'C:\Windows\SysWOW64\win32u.dll'. Cannot find or open the PDB file.
'FinalSpace.exe' (Win32): Loaded 'C:\Windows\SysWOW64\advapi32.dll'. Cannot find or open the PDB file.
'FinalSpace.exe' (Win32): Loaded 'C:\Windows\SysWOW64\vcruntime140d.dll'. Cannot find or open the PDB file.
'FinalSpace.exe' (Win32): Loaded 'C:\Windows\SysWOW64\msvcrt.dll'. Cannot find or open the PDB file.
'FinalSpace.exe' (Win32): Loaded 'C:\Windows\SysWOW64\sechost.dll'. Cannot find or open the PDB file.
'FinalSpace.exe' (Win32): Loaded 'C:\Windows\SysWOW64\opengl32.dll'. Cannot find or open the PDB file.
'FinalSpace.exe' (Win32): Loaded 'C:\Windows\SysWOW64\rpcrt4.dll'. Cannot find or open the PDB file.
'FinalSpace.exe' (Win32): Loaded 'C:\Windows\SysWOW64\sspicli.dll'. Cannot find or open the PDB file.
'FinalSpace.exe' (Win32): Loaded 'C:\Windows\SysWOW64\cryptbase.dll'. Cannot find or open the PDB file.
'FinalSpace.exe' (Win32): Loaded 'C:\Windows\SysWOW64\sfml-system-2.dll'. Module was built without symbols.
'FinalSpace.exe' (Win32): Loaded 'C:\Windows\SysWOW64\bcryptprimitives.dll'. Cannot find or open the PDB file.
'FinalSpace.exe' (Win32): Loaded 'C:\Windows\SysWOW64\winmm.dll'. Cannot find or open the PDB file.
'FinalSpace.exe' (Win32): Loaded 'C:\Windows\SysWOW64\ucrtbased.dll'. Cannot find or open the PDB file.
'FinalSpace.exe' (Win32): Loaded 'C:\Windows\SysWOW64\glu32.dll'. Cannot find or open the PDB file.
'FinalSpace.exe' (Win32): Loaded 'C:\Windows\SysWOW64\msvcp140.dll'. Cannot find or open the PDB file.
'FinalSpace.exe' (Win32): Loaded 'C:\Windows\SysWOW64\vcruntime140.dll'. Cannot find or open the PDB file.
'FinalSpace.exe' (Win32): Loaded 'C:\Windows\SysWOW64\winmmbase.dll'. Cannot find or open the PDB file.
'FinalSpace.exe' (Win32): Loaded 'C:\Windows\SysWOW64\winmmbase.dll'. Cannot find or open the PDB file.
'FinalSpace.exe' (Win32): Unloaded 'C:\Windows\SysWOW64\winmmbase.dll'
'FinalSpace.exe' (Win32): Loaded 'C:\Windows\SysWOW64\cfgmgr32.dll'. Cannot find or open the PDB file.
'FinalSpace.exe' (Win32): Loaded 'C:\Windows\SysWOW64\imm32.dll'. Cannot find or open the PDB file.
'FinalSpace.exe' (Win32): Loaded 'C:\Windows\SysWOW64\uxtheme.dll'. Cannot find or open the PDB file.
'FinalSpace.exe' (Win32): Loaded 'C:\Windows\SysWOW64\combase.dll'. Cannot find or open the PDB file.
'FinalSpace.exe' (Win32): Loaded 'C:\Windows\SysWOW64\msctf.dll'. Cannot find or open the PDB file.
'FinalSpace.exe' (Win32): Loaded 'C:\Windows\SysWOW64\oleaut32.dll'. Cannot find or open the PDB file.
'FinalSpace.exe' (Win32): Loaded 'C:\Windows\System32\DriverStore\FileRepository\nvhm.inf_amd64_ebea877f10dfbbc7\nvinit.dll'. Cannot find or open the PDB file.
'FinalSpace.exe' (Win32): Loaded 'C:\Windows\SysWOW64\version.dll'. Cannot find or open the PDB file.
'FinalSpace.exe' (Win32): Loaded 'C:\Windows\SysWOW64\ig75icd32.dll'. Cannot find or open the PDB file.
'FinalSpace.exe' (Win32): Unloaded 'C:\Windows\SysWOW64\ig75icd32.dll'
'FinalSpace.exe' (Win32): Loaded 'C:\Windows\SysWOW64\ig75icd32.dll'. Cannot find or open the PDB file.
'FinalSpace.exe' (Win32): Loaded 'C:\Windows\SysWOW64\shell32.dll'. Cannot find or open the PDB file.
'FinalSpace.exe' (Win32): Loaded 'C:\Windows\SysWOW64\SHCore.dll'. Cannot find or open the PDB file.
'FinalSpace.exe' (Win32): Loaded 'C:\Windows\SysWOW64\windows.storage.dll'. Cannot find or open the PDB file.
'FinalSpace.exe' (Win32): Loaded 'C:\Windows\SysWOW64\igdusc32.dll'. Cannot find or open the PDB file.
'FinalSpace.exe' (Win32): Loaded 'C:\Windows\SysWOW64\shlwapi.dll'. Cannot find or open the PDB file.
'FinalSpace.exe' (Win32): Loaded 'C:\Windows\SysWOW64\kernel.appcore.dll'. Cannot find or open the PDB file.
'FinalSpace.exe' (Win32): Loaded 'C:\Windows\SysWOW64\profapi.dll'. Cannot find or open the PDB file.
'FinalSpace.exe' (Win32): Loaded 'C:\Windows\SysWOW64\powrprof.dll'. Cannot find or open the PDB file.
'FinalSpace.exe' (Win32): Loaded 'C:\Windows\SysWOW64\fltLib.dll'. Cannot find or open the PDB file.
'FinalSpace.exe' (Win32): Loaded 'C:\Windows\SysWOW64\wtsapi32.dll'. Cannot find or open the PDB file.
'FinalSpace.exe' (Win32): Loaded 'C:\Windows\SysWOW64\dwmapi.dll'. Cannot find or open the PDB file.
'FinalSpace.exe' (Win32): Unloaded 'C:\Windows\SysWOW64\version.dll'
'FinalSpace.exe' (Win32): Unloaded 'C:\Windows\System32\DriverStore\FileRepository\nvhm.inf_amd64_ebea877f10dfbbc7\nvinit.dll'
The thread 0x2dac has exited with code 0 (0x0).
'FinalSpace.exe' (Win32): Loaded 'C:\Windows\SysWOW64\version.dll'. Cannot find or open the PDB file.
'FinalSpace.exe' (Win32): Unloaded 'C:\Windows\SysWOW64\version.dll'
'FinalSpace.exe' (Win32): Loaded 'C:\Windows\SysWOW64\dinput8.dll'. Cannot find or open the PDB file.
'FinalSpace.exe' (Win32): Loaded 'C:\Windows\SysWOW64\InputHost.dll'. Cannot find or open the PDB file.
'FinalSpace.exe' (Win32): Unloaded 'C:\Windows\SysWOW64\InputHost.dll'
'FinalSpace.exe' (Win32): Loaded 'C:\Windows\SysWOW64\InputHost.dll'. Cannot find or open the PDB file.
'FinalSpace.exe' (Win32): Loaded 'C:\Windows\SysWOW64\WinTypes.dll'. Cannot find or open the PDB file.
'FinalSpace.exe' (Win32): Loaded 'C:\Windows\SysWOW64\CoreMessaging.dll'. Cannot find or open the PDB file.
'FinalSpace.exe' (Win32): Loaded 'C:\Windows\SysWOW64\CoreUIComponents.dll'. Cannot find or open the PDB file.
'FinalSpace.exe' (Win32): Loaded 'C:\Windows\SysWOW64\ntmarta.dll'. Cannot find or open the PDB file.
'FinalSpace.exe' (Win32): Loaded 'C:\Windows\SysWOW64\hid.dll'. Cannot find or open the PDB file.
'FinalSpace.exe' (Win32): Loaded 'C:\Windows\SysWOW64\setupapi.dll'. Cannot find or open the PDB file.
'FinalSpace.exe' (Win32): Loaded 'C:\Windows\SysWOW64\devobj.dll'. Cannot find or open the PDB file.
'FinalSpace.exe' (Win32): Loaded 'C:\Windows\SysWOW64\wintrust.dll'. Cannot find or open the PDB file.
'FinalSpace.exe' (Win32): Loaded 'C:\Windows\SysWOW64\msasn1.dll'. Cannot find or open the PDB file.
'FinalSpace.exe' (Win32): Loaded 'C:\Windows\SysWOW64\crypt32.dll'. Cannot find or open the PDB file.
Exception thrown at 0x7687DDC2 in FinalSpace.exe: Microsoft C++ exception: std::length_error at memory location 0x008FF510.
Unhandled exception at 0x7687DDC2 in FinalSpace.exe: Microsoft C++ exception: std::length_error at memory location 0x008FF510.
我在做什么错,我该如何解决?
答案 0 :(得分:0)
我认为这与您在属性中的链接有关。 您是否将配置设置为活动的Debug并添加了库依赖项 dll文件名的末尾带有“ -d”的“ sfml-graphics-d.lib”,“ sfml-system-d.lib”,“ sfml-window-d.lib”和dll文件。 提及dll文件位于游戏文件夹中,您应该在其中添加它们
答案 1 :(得分:0)
这些“无法找到或打开PDB”都不是错误。他们只是说尚未找到那些指定模块的程序调试数据库。我不建议下载所有这些,所以我认为您还可以。如果要下载它们,请使用VS的设置,并启用从Microsoft符号服务器下载所有符号文件的功能。