2010-11-25 17 views
2

Ich habe eine Frage dazu früher und stellte fest, dass mein Problem nicht wirklich gelöst wurde. Wie auch immer, meine Frage/Problem ist, dass aus irgendeinem Grund, wenn ich meine SDL-Anwendung über die IDE laufen lasse, sei es Code :: Blocks oder Visual C++ 2010, wird mein BMP nicht geladen. Wenn ich jedoch den Datei-Explorer durchführe, werden die BMPs korrekt angezeigt. Ich bin mir nicht sicher, was das Problem ist, vielleicht hat es etwas damit zu tun, dass ich 64-Bit-Windows verwende?SDL: IDE/Image Probleme

Wenn ich führen Sie es durch Visual C++ 2010 erhalte ich die folgenden Fehler:

'Brain Bread.exe': Loaded 'C:\Users\UserNameHere\Desktop\Brain Bread\Debug\Brain Bread.exe', Symbols loaded. 
'Brain Bread.exe': Loaded 'C:\Windows\SysWOW64\ntdll.dll', Cannot find or open the PDB file 
'Brain Bread.exe': Loaded 'C:\Windows\SysWOW64\kernel32.dll', Cannot find or open the PDB file 
'Brain Bread.exe': Loaded 'C:\Windows\SysWOW64\KernelBase.dll', Cannot find or open the PDB file 
'Brain Bread.exe': Loaded 'C:\Users\UserNameHere\Desktop\Brain Bread\Debug\SDL.dll', Binary was not built with debug information. 
'Brain Bread.exe': Loaded 'C:\Windows\SysWOW64\advapi32.dll', Cannot find or open the PDB file 
'Brain Bread.exe': Loaded 'C:\Windows\SysWOW64\msvcrt.dll', Cannot find or open the PDB file 
'Brain Bread.exe': Loaded 'C:\Windows\SysWOW64\sechost.dll', Cannot find or open the PDB file 
'Brain Bread.exe': Loaded 'C:\Windows\SysWOW64\rpcrt4.dll', Cannot find or open the PDB file 
'Brain Bread.exe': Loaded 'C:\Windows\SysWOW64\sspicli.dll', Cannot find or open the PDB file 
'Brain Bread.exe': Loaded 'C:\Windows\SysWOW64\cryptbase.dll', Cannot find or open the PDB file 
'Brain Bread.exe': Loaded 'C:\Windows\SysWOW64\gdi32.dll', Cannot find or open the PDB file 
'Brain Bread.exe': Loaded 'C:\Windows\SysWOW64\user32.dll', Cannot find or open the PDB file 
'Brain Bread.exe': Loaded 'C:\Windows\SysWOW64\lpk.dll', Cannot find or open the PDB file 
'Brain Bread.exe': Loaded 'C:\Windows\SysWOW64\usp10.dll', Cannot find or open the PDB file 
'Brain Bread.exe': Loaded 'C:\Windows\SysWOW64\winmm.dll', Cannot find or open the PDB file 
'Brain Bread.exe': Loaded 'C:\Windows\SysWOW64\msvcr100d.dll', Symbols loaded. 
'Brain Bread.exe': Loaded 'C:\Windows\SysWOW64\apphelp.dll', Cannot find or open the PDB file 
'Brain Bread.exe': Loaded 'C:\Windows\AppPatch\AcLayers.dll', Cannot find or open the PDB file 
'Brain Bread.exe': Loaded 'C:\Windows\SysWOW64\shell32.dll', Cannot find or open the PDB file 
'Brain Bread.exe': Loaded 'C:\Windows\SysWOW64\shlwapi.dll', Cannot find or open the PDB file 
'Brain Bread.exe': Loaded 'C:\Windows\SysWOW64\ole32.dll', Cannot find or open the PDB file 
'Brain Bread.exe': Loaded 'C:\Windows\SysWOW64\oleaut32.dll', Cannot find or open the PDB file 
'Brain Bread.exe': Loaded 'C:\Windows\SysWOW64\userenv.dll', Cannot find or open the PDB file 
'Brain Bread.exe': Loaded 'C:\Windows\SysWOW64\profapi.dll', Cannot find or open the PDB file 
'Brain Bread.exe': Loaded 'C:\Windows\SysWOW64\winspool.drv', Cannot find or open the PDB file 
'Brain Bread.exe': Loaded 'C:\Windows\SysWOW64\mpr.dll', Cannot find or open the PDB file 
'Brain Bread.exe': Loaded 'C:\Windows\SysWOW64\imm32.dll', Cannot find or open the PDB file 
'Brain Bread.exe': Loaded 'C:\Windows\SysWOW64\msctf.dll', Cannot find or open the PDB file 
'Brain Bread.exe': Loaded 'C:\Windows\SysWOW64\ddraw.dll', Cannot find or open the PDB file 
'Brain Bread.exe': Loaded 'C:\Windows\SysWOW64\dciman32.dll', Cannot find or open the PDB file 
'Brain Bread.exe': Loaded 'C:\Windows\SysWOW64\setupapi.dll', Cannot find or open the PDB file 
'Brain Bread.exe': Loaded 'C:\Windows\SysWOW64\cfgmgr32.dll', Cannot find or open the PDB file 
'Brain Bread.exe': Loaded 'C:\Windows\SysWOW64\devobj.dll', Cannot find or open the PDB file 
'Brain Bread.exe': Loaded 'C:\Windows\SysWOW64\dwmapi.dll', Cannot find or open the PDB file 
'Brain Bread.exe': Unloaded 'C:\Windows\SysWOW64\ddraw.dll' 
'Brain Bread.exe': Unloaded 'C:\Windows\SysWOW64\dwmapi.dll' 
'Brain Bread.exe': Unloaded 'C:\Windows\SysWOW64\setupapi.dll' 
'Brain Bread.exe': Unloaded 'C:\Windows\SysWOW64\devobj.dll' 
'Brain Bread.exe': Unloaded 'C:\Windows\SysWOW64\cfgmgr32.dll' 
'Brain Bread.exe': Unloaded 'C:\Windows\SysWOW64\dciman32.dll' 
'Brain Bread.exe': Loaded 'C:\Windows\SysWOW64\uxtheme.dll', Cannot find or open the PDB file 
'Brain Bread.exe': Loaded 'C:\Windows\SysWOW64\dwmapi.dll', Cannot find or open the PDB file 
'Brain Bread.exe': Loaded 'C:\Windows\SysWOW64\KBDUS.DLL', Cannot find or open the PDB file 
'Brain Bread.exe': Unloaded 'C:\Windows\SysWOW64\KBDUS.DLL' 
'Brain Bread.exe': Loaded 'C:\Windows\SysWOW64\KBDUS.DLL', Cannot find or open the PDB file 
'Brain Bread.exe': Unloaded 'C:\Windows\SysWOW64\KBDUS.DLL' 
The program '[4992] Brain Bread.exe: Native' has exited with code 0 (0x0). 

Antwort

4

Wahrscheinlich liegt es daran, wenn Sie Ihr Programm durch die IDE ausführen, die IDE falsch das aktuelle Arbeitsverzeichnis für das Programm setzt, so Wenn Sie relative Pfade zu den BMPs in Ihrem Code verwenden, funktioniert das nicht. Versuchen Sie herauszufinden, welches Arbeitsverzeichnis die IDE für Ihre App erstellt und kopieren Sie die BMPs dort.

+0

Danke. Das hat ganz gut funktioniert; Ich hätte es nie erraten! : D – Lemmons

1

Das Problem ist wahrscheinlich das aktuelle Arbeitsverzeichnis. Code :: Blocks führt Ihre Anwendung aus, wo sich die *.cbp-Datei befindet. Ich bin mir sicher, dass Code :: Blocks dies irgendwo ändern kann.