Frage

Ich stellte eine Frage zu diesem früheren und erkannte, dass mein Problem gelöst nicht wirklich war. Wie auch immer, meine Frage / Problem ist, aus irgendeinem Grund, dass, wenn ich meine SDL Anwendung durch die IDE ausführen, sei es Code :: Blocks oder Visual C ++ 2010 mein BMP wird nicht geladen. Allerdings, wenn ich es über die Datei-Explorer ausführen wird es die BMPs richtig zeigen. Ich bin nicht sicher, was das Problem ist, vielleicht ist es etwas mit der Tatsache zu tun, dass ich mit 64-Bit-Windows?

Wenn ich es durch Visual C ++ ausführen 2010 habe ich die folgenden Fehlermeldungen erhalten:

'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).
War es hilfreich?

Lösung

Wahrscheinlich liegt es daran, wenn Sie Ihr Programm durch die IDE ausführen, setzt das IDE das aktuelle Arbeitsverzeichnis für das Programm falsch, wenn Sie also in Ihrem Code relative Pfade zu den BMPs verwenden, wird es nicht funktionieren. Versuchen Sie herauszufinden, welche die IDE-Sets für Ihre Anwendung arbeiten dir und kopieren Sie die BMPs dort.

Andere Tipps

Das Problem ist wahrscheinlich das aktuelle Arbeitsverzeichnis. Code :: Blocks läuft Ihre Anwendung von wo aus die *.cbp Datei befindet. Ich bin sicher, dass Code :: Blocks können Sie das irgendwo ändern.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top