0
#include <OgreRoot.h>
#if OGRE_PLATFORM == OGRE_PLATFORM_WIN32
#define WIN32_LEAN_AND_MEAN
#include "windows.h"
#endif
#ifdef __cplusplus
extern "C" {
#endif
#if OGRE_PLATFORM == OGRE_PLATFORM_WIN32
INT WINAPI WinMain(HINSTANCE hInst, HINSTANCE, LPSTR strCmdLine, INT)
#else
int main(int argc, char *argv[])
#endif
{//main
Ogre::Root* root = new Ogre::Root("plugins.cfg", "ogre.cfg", "Ogre.log");
delete root;
return 0;
}//main
#ifdef __cplusplus
}
#endif
이 프로그램은 성공적으로 빌드 "는 PDB 파일을 찾거나 열 수 없습니다"라는 충돌을 제외한 빌드하지만 충돌은 다음과 같은 메시지와 함께 실행하면 오우거 프로그램은
두 가지가 생각 난
'NavProjectOgre.exe': Loaded 'C:\Ogre\Programs\NavProjectOgre\Debug\NavProjectOgre.exe', Symbols loaded.
'NavProjectOgre.exe': Loaded 'C:\WINDOWS\system32\ntdll.dll', Cannot find or open the PDB file
'NavProjectOgre.exe': Loaded 'C:\WINDOWS\system32\kernel32.dll', Cannot find or open the PDB file
'NavProjectOgre.exe': Loaded 'C:\Ogre\Programs\NavProjectOgre\Debug\OgreMain_d.dll', Cannot find or open the PDB file
'NavProjectOgre.exe': Loaded 'C:\WINDOWS\system32\user32.dll', Cannot find or open the PDB file
'NavProjectOgre.exe': Loaded 'C:\WINDOWS\system32\gdi32.dll', Cannot find or open the PDB file
'NavProjectOgre.exe': Loaded 'C:\WINDOWS\system32\msvcp100d.dll', Symbols loaded.
'NavProjectOgre.exe': Loaded 'C:\WINDOWS\system32\msvcr100d.dll', Symbols loaded.
'NavProjectOgre.exe': Loaded 'C:\WINDOWS\system32\ws2_32.dll', Cannot find or open the PDB file
'NavProjectOgre.exe': Loaded 'C:\WINDOWS\system32\advapi32.dll', Cannot find or open the PDB file
'NavProjectOgre.exe': Loaded 'C:\WINDOWS\system32\rpcrt4.dll', Cannot find or open the PDB file
'NavProjectOgre.exe': Loaded 'C:\WINDOWS\system32\secur32.dll', Cannot find or open the PDB file
'NavProjectOgre.exe': Loaded 'C:\WINDOWS\system32\msvcrt.dll', Cannot find or open the PDB file
'NavProjectOgre.exe': Loaded 'C:\WINDOWS\system32\ws2help.dll', Cannot find or open the PDB file
'NavProjectOgre.exe': Loaded 'C:\WINDOWS\system32\imm32.dll', Cannot find or open the PDB file
'NavProjectOgre.exe': Loaded 'C:\WINDOWS\system32\lpk.dll', Cannot find or open the PDB file
'NavProjectOgre.exe': Loaded 'C:\WINDOWS\system32\usp10.dll', Cannot find or open the PDB file
First-chance exception at 0x7c812afb in NavProjectOgre.exe: Microsoft C++ exception: Ogre::FileNotFoundException at memory location 0x0012f46c..
The program '[4240] NavProjectOgre.exe: Native' has exited with code 0 (0x0).
:
int main(int argc, char *argv[])
은 프로그램 컨트롤이 거기에 도달하지 못하기 때문에 Visual Studio에서 흐릿한 색의 글꼴로 표시되지만 일반 색 글꼴로 표시됩니다. 뭔가 잘못?- 프로그램이 성공적으로 빌드되었을 때 프로그램이 왜 충돌합니까?
당신이'Debug' 구성을 사용하여 컴파일하고 있는가? –
예. Ogre.sln의 Debug 빌드 설정에서만 소스에서 Ogre를 빌드했습니다. 내 애플 리케이션을 구축하는 동안, 그것은 디버그 구성을 사용하고 있습니다. – Nav