another compilation error..

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
metalhead
Posts: 4
Joined: Mon Sep 22, 2008 5:42 pm

another compilation error..

Post by metalhead »

Hi there,

I'm trying to run the first example 01.HelloWorld and already fail..
I followed the instructions of the tutorial exactly, however I get the error:
LINK : fatal error LNK1104: cannot open file 'Irrlicht.lib'
in addition to that:
d:\irrlicht-1.4.1\examples\demo\CDemo.h(21) : fatal error C1083: Cannot open include file: 'irrKlang.h': No such file or directory
Does anyone have an idea why it doesn't work?

By the way: I'm working on Vista 32bit with Visual Studio 2008 Professional

It would be really nice, if somebody could help me. :)
koto
Posts: 7
Joined: Sun Aug 24, 2008 3:06 pm

Post by koto »

Hi

Just for the first step I recommend you to go into '01.HelloWorld' subdirectory and open HelloWorld.sln. It will compile.

I think that the error you see happens because one of the demos requires irrKlang library which is not present in irrlicht sources.

regards
Koto
metalhead
Posts: 4
Joined: Mon Sep 22, 2008 5:42 pm

Post by metalhead »

true.
I thought compiling "BuildAllExamples.sln" should work, too.
Thanks for helping! :)
rogerborg
Admin
Posts: 3590
Joined: Mon Oct 09, 2006 9:36 am
Location: Scotland - gonnae no slag aff mah Engleesh
Contact:

Re: another compilation error..

Post by rogerborg »

metalhead wrote:
LINK : fatal error LNK1104: cannot open file 'Irrlicht.lib'
The online tutorials can be slightly out of date, but this looks like a configuration problem, or a borked SDK install.

First, look in your Irrlicht SDK, in the directory:

\lib\Win32-visualstudio

Does it contain an Irrlicht.lib file? If not, then re-install your SDK. I'd recommend upgrading to the latest version, 1.4.2 at the time of writing.

If you do have an Irrlicht.lib file, then open BuildAllExamples.sln in MSVC++.

Right click on 01.HelloWorld_vc8, and select Properties.

Under Configuration Properties -> Linker -> General, find the Additional Library Directories property. It should be:

..\..\lib\Win32-visualstudio

If not, make it so.

That should set your IDE up correctly so that it can find Irrlicht.lib

metalhead wrote: in addition to that:
d:\irrlicht-1.4.1\examples\demo\CDemo.h(21) : fatal error C1083: Cannot open include file: 'irrKlang.h': No such file or directory
I assume you're using Irrlicht 1.4? The first step in any compilation problem is to look at the source:

Code: Select all

#ifdef USE_IRRKLANG
	#include <irrKlang.h>	// problem here? go to http://www.ambiera.com/irrklang and download
							// the irrKlang library or undefine USE_IRRKLANG at the beginning
							// of this file.
	#ifdef _IRR_WINDOWS_
	#pragma comment (lib, "irrKlang.lib")
	#endif
#endif
The solution is in the comments. Alternatively, update your SDK to 1.4.1 / 1.4.2 or the SVN trunk, where USE_IRRKLANG is not defined by default.
Last edited by rogerborg on Tue Sep 23, 2008 9:42 am, edited 1 time in total.
Please upload candidate patches to the tracker.
Need help now? IRC to #irrlicht on irc.freenode.net
How To Ask Questions The Smart Way
B@z
Posts: 876
Joined: Thu Jan 31, 2008 5:05 pm
Location: Hungary

Post by B@z »

yeah i had that problem before too,
but just commented #define USE_IRRKLANG
and worked xD

i dont have irrklang at my computer
Post Reply