A Beginner and stuck

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
Asimov
Posts: 246
Joined: Thu Dec 04, 2014 7:41 pm
Contact:

A Beginner and stuck

Post by Asimov »

Hi all,

I have come through a few engines and decided this engine is right for my new project.
I am proficient in Unity, and I have made 2D games using Directx, but now I want to get into 3D and rather than re-invent the wheel I thought I would try irrlicht.

Before I came to this conclusion I spent a week with neoaxis, and due to poor documentation I came to the conclusion it wasn't the engine for me.

Now while being impressed with irrlicht I am having a problem.

I used code::blocks in previous projects using SDL and tend to use Visual studio for directx stuff, but I much prefer code::blocks. It is less intensive than visual studio.

I followed a video tutorial to set up irrlicht and I cannot get it to compile.
https://www.youtube.com/watch?v=LCexJJydTpQ

Then when that failed I tried a couple of other tutorials.

One tutorial said to put the path to libirrlicht.a in the linker, and in another tutorial it said to put Irrlicht there. I am confused. which one is right? By the way both failed at compiling anyway.

Can someone point me to a good tutorial?

The only one I have found on this site so far uses the visual studio library, and I would prefer to use mingw gcc.

I think I could learn this engine if only I could get hello world to compile

PS I also used the built in template in code::blocks too, but that wouldn't compile either.

Asimov
CuteAlien
Admin
Posts: 9734
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Re: A Beginner and stuck

Post by CuteAlien »

There's some tutorials on the wiki I think.
Otherwise start with the c::b project files coming with Irrlicht (BuildAllExamples.workspace
in the examples folder). Try compiling that and if it fails please give us the exact error you are getting.

Linking and compiling works pretty much like with (nearly) every c++ library.
You have to add include path to your project so it finds the include files (you get errors otherwise about not finding a include files)
You have to add linker path to your project so it finds the library (libIrrlicht.a for gcc or Irrlicht.lib for VS) (you get an error about the library not being found or unresolved externals otherwise)
You have to add the library itself (libIrrlicht.a) (you get errors otherwise about unresolved externals)
And you if you link dynamically you to ensure it finds the dll when you start your application (it will tell you it doesn't find the dll otherwise on start).
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
Asimov
Posts: 246
Joined: Thu Dec 04, 2014 7:41 pm
Contact:

Re: A Beginner and stuck

Post by Asimov »

Hi CuteAlien,

Thanks. Strangely enough I just found a folder in irrlicht called examples. I tried the hello world example and it worked. Now my folder is in a different location and it doesn't work. So I am guessing it is a path thing, so I can't understand why it isn't working at the moment, but at least I have something to go on now.

Asimov
Asimov
Posts: 246
Joined: Thu Dec 04, 2014 7:41 pm
Contact:

Re: A Beginner and stuck

Post by Asimov »

Hi CuteAlien,

I think I have it worked out now. You see my settings were right all along. It seems that the irrlicht.dll I copied into my release folder, and my debug folder was the wrong one.
I then got the one out of the Win32-gcc folder, and copied that one, and now my hello world code works woopee.

Now all I gotta do is learn how to use irrlicht. I am on the first rung of the ladder at least.

Thanks for the help anyway. I never thought of looking at the examples folder.

Asimov
CuteAlien
Admin
Posts: 9734
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Re: A Beginner and stuck

Post by CuteAlien »

Cool. And fastest way to learning Irrlicht is probably to check out the codes in the examples folder as well and play with them :-)
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