Compile Irrlicht With VC++ 2008 Express Edition ?

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
andrei71
Posts: 9
Joined: Tue Apr 19, 2011 5:05 am

Compile Irrlicht With VC++ 2008 Express Edition ?

Post by andrei71 »

Hi,

I am new here and i am using VC++ 2008 Express Edition IDE.i have try to compile Irrlicht with this IDE.but it still failed.

these are my steps :

1.Download Irrlicht SDK and extract it
2.Open VC++ 2008>>File>>New Project>>Win32Project>>Latihan.cpp
3.Paste all Irrlicht headers in VC include folder
4.Paste Irrlicht.lib in VC library folder
5.Open Latihan properties in VC++2008>>Linker>>Input>>Additional Dependencies>>Insert Irrlicht.lib>>OK
6.Insert Irrlicht codes in Latihan.cpp :

http://irrlicht.sourceforge.net/tut001.html

7.Paste Irrlicht.dll in system32
8.Build solution
9.Debug
10.Fail to display :

Code: Select all

'Latihan.exe': Loaded 'C:\Documents and Settings\Acer\My Documents\Visual Studio 2008\Projects\Latihan\Debug\Latihan.exe', Symbols loaded.
'Latihan.exe': Loaded 'C:\WINDOWS\system32\ntdll.dll'
'Latihan.exe': Loaded 'C:\WINDOWS\system32\kernel32.dll'
'Latihan.exe': Loaded 'C:\WINDOWS\system32\Irrlicht.dll', Binary was not built with debug information.
'Latihan.exe': Loaded 'C:\WINDOWS\system32\user32.dll'
'Latihan.exe': Loaded 'C:\WINDOWS\system32\gdi32.dll'
'Latihan.exe': Loaded 'C:\WINDOWS\system32\advapi32.dll'
'Latihan.exe': Loaded 'C:\WINDOWS\system32\rpcrt4.dll'
'Latihan.exe': Loaded 'C:\WINDOWS\system32\opengl32.dll'
'Latihan.exe': Loaded 'C:\WINDOWS\system32\msvcrt.dll'
'Latihan.exe': Loaded 'C:\WINDOWS\system32\glu32.dll'
'Latihan.exe': Loaded 'C:\WINDOWS\system32\ddraw.dll'
'Latihan.exe': Loaded 'C:\WINDOWS\system32\dciman32.dll'
'Latihan.exe': Loaded 'C:\WINDOWS\system32\winmm.dll'
'Latihan.exe': Loaded 'C:\WINDOWS\WinSxS\x86_Microsoft.VC90.DebugCRT_1fc8b3b9a1e18e3b_9.0.30729.1_x-ww_f863c71f\msvcr90d.dll'
'Latihan.exe': Loaded 'C:\WINDOWS\system32\imm32.dll'
Irrlicht Engine version 1.7.2
Microsoft Windows XP Professional Service Pack 2 (Build 2600)
'Latihan.exe': Loaded 'C:\WINDOWS\system32\uxtheme.dll'
'Latihan.exe': Loaded 'C:\WINDOWS\system32\msctf.dll'
'Latihan.exe': Loaded 'C:\WINDOWS\system32\version.dll'
'Latihan.exe': Unloaded 'C:\WINDOWS\system32\version.dll'
'Latihan.exe': Loaded 'C:\WINDOWS\system32\MSCTFIME.IME'
'Latihan.exe': Loaded 'C:\WINDOWS\system32\ole32.dll'
'Latihan.exe': Loaded 'C:\WINDOWS\system32\BtMmHook.dll'
'Latihan.exe': Loaded 'C:\WINDOWS\system32\oleaut32.dll'
BTMMHOOK 20.04.2011 10:21:26 Thread<0C38> Hook DLL loaded
BTMMHOOK 20.04.2011 10:21:26 Thread<0C38> Hook DLL unloaded
The program '[1664] Latihan.exe: Native' has exited with code 0 (0x0).
please help,thanks
CuteAlien
Admin
Posts: 9934
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Post by CuteAlien »

Several things. First you shouldn't have to copy around so much stuff. Although it works, it's just not the best solution. VS needs the include path for the compiler and the library path for the linker. The include path tells where the irrlicht headers are (for example irrlicht/include and the library path tells where the lib is (for example irrlicht/bin/Win32-VisualStudio). After that it's sufficient to add Irrlicht.lib as additional library and to include "irrlicht.h" in your sources.

But anyway - your solution will also work and indeed seem to have compiled and linked and started. So library seems fine. Don't you get _any_ errors? For example in the console window? Or a message box?

edit: Also you might not have noticed, but the examples are all in the Irrlicht/examples folder and come with working Visual Studio project files. So maybe start there.
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Radikalizm
Posts: 1215
Joined: Tue Jan 09, 2007 7:03 pm
Location: Leuven, Belgium

Post by Radikalizm »

One more tip: Never copy irrlicht.dll to your system32 folder, as soon as a new version comes out you might forget to replace it which can cause you serious headaches ;)
andrei71
Posts: 9
Joined: Tue Apr 19, 2011 5:05 am

Post by andrei71 »

But anyway - your solution will also work and indeed seem to have compiled and linked and started. So library seems fine. Don't you get _any_ errors? For example in the console window? Or a message box?
Yes my solution was neither succeeded nor failed but 1 up to date in the report,what's wrong ?
One more tip: Never copy irrlicht.dll to your system32 folder, as soon as a new version comes out you might forget to replace it which can cause you serious headaches
If i don't put the dll extension in system32 folder,the application don't work.is it obsolete ?
Radikalizm
Posts: 1215
Joined: Tue Jan 09, 2007 7:03 pm
Location: Leuven, Belgium

Post by Radikalizm »

An application will look for library files in varying places, a complete list can be found here http://msdn.microsoft.com/en-us/library ... s.85).aspx

Your application will always try to find the needed libraries in the directory it started in, so that's where you should place your irrlicht.dll

Try to mess with system32 as little as possible in any situation
CuteAlien
Admin
Posts: 9934
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Post by CuteAlien »

Try building the examples first (in the examples folder of Irrlicht). Can you compile and start those?
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Post Reply