Linux Problems (Was quite simple)

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.
Dr.Bunshin
Posts: 34
Joined: Sat Mar 31, 2007 8:38 pm

Linux Problems (Was quite simple)

Post by Dr.Bunshin »

Hello everyone!

I am on linux (DSL) and im having trouble compiling an irrlicht app. I sucessfully compiled Irrlicht itself. But when I just do

Code: Select all

#include<irrlicht.h>
int main() { IrrlichtDevice *device; return 0; };
That is the simplist right? gcc does not say anything about not finding irrlicht.h. oh right, errors:
Sorry, i cant get the errors, but IrrlichtDevice is undeclared, thats the problem whats wrong with gcc
Last edited by Dr.Bunshin on Sat Aug 11, 2007 5:11 pm, edited 2 times in total.
CuteAlien
Admin
Posts: 9733
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Re: Linux Problems (should be simple)

Post by CuteAlien »

Dr.Bunshin wrote:oh right, errors:
grr, I cant get it to do redirect in dsl and I dont have middle mouse button. any tips?
Sure, you can use that thing called keyboard. It's maybe not as comfortable as the middle mouse button, but still usable in emergency situations like this one.
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
Dr.Bunshin
Posts: 34
Joined: Sat Mar 31, 2007 8:38 pm

Post by Dr.Bunshin »

lol thanks but If there is a stroke for copy from xterm, tell me cause i dont know. ctrl + c does not work to my experience. also, i dont like the mouse, at home i prefer VR glove.
CuteAlien
Admin
Posts: 9733
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Post by CuteAlien »

You must add

Code: Select all

using namespace irr;
or write irr::IrrlichtDevice
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
Dr.Bunshin
Posts: 34
Joined: Sat Mar 31, 2007 8:38 pm

Post by Dr.Bunshin »

Wow, how stupid can I be? I got so used to coding my game in windows that I forgot irrlicht was organized in namespaces
Thanks a ton!
Wyszo
Posts: 49
Joined: Sun Jun 24, 2007 8:44 am

Post by Wyszo »

Also don't forget to link irrlicht library.
Oh, and one another thing - if you are booting DSL from pendrive - that's ok, but if you installed it and boot from hdd - swap to some "full" distro - I recommend Ubuntu :)
Dr.Bunshin
Posts: 34
Joined: Sat Mar 31, 2007 8:38 pm

Post by Dr.Bunshin »

Well, Im using DSL cause it runs well on this antique laptop, thats all. I did link against the irrlicht library but i still have a small linker problem. Its something to do with irrlichts allocator. One of the errors goes something like this "Undefined refrence to operator delete(void*)"

Any ideas?
Thanks in advance, even if you dont fix it. :)
Last edited by Dr.Bunshin on Thu Aug 09, 2007 3:36 pm, edited 1 time in total.
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

Linking against the proper C library maybe? Or stdc++ library? Make sure that you name your C++ files .cpp or .cc such that gcc chooses the correct mode, and use g++ when linking the app.
Dr.Bunshin
Posts: 34
Joined: Sat Mar 31, 2007 8:38 pm

Post by Dr.Bunshin »

Yay! Thanks hybrid, I didnt think to use g++, I thought it was a link anyways. Well thats what did it, g++. Thanks again.

On a later note, does anyone know of a good chm view for linux? So I can read the irrlicht api witout internet.
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

Just use doxygen to create a html set or even a pdf from the actual sources from SDK. You can use the doxygen config file from scripts/, just enable the parts you want.
rooly
Posts: 224
Joined: Tue Oct 25, 2005 4:32 pm
Location: Louisiana, USA, backwater country
Contact:

Post by rooly »

i know gnome and kde both have chm viewers made. your just gonna have to find them.
When banks compete, you win.
When ISPs compete, you win.
When electronics retailers compete, you win.
When governments compete...you get drafted.
Wyszo
Posts: 49
Joined: Sun Jun 24, 2007 8:44 am

Post by Wyszo »

GnoCHM
Dr.Bunshin
Posts: 34
Joined: Sat Mar 31, 2007 8:38 pm

Post by Dr.Bunshin »

I would prefer to build my own html documentation, so where is this scripts/ you speak of? Its not in my irrlicht sdk nor is it in the doxygen as far as i can tell. Thanks some more for the help guys.

Edit: Also, I got a funny linker error. Its a undefined refrence to the createDevice() function. Sup with that?
randomMesh
Posts: 1186
Joined: Fri Dec 29, 2006 12:04 am

Post by randomMesh »

Dr.Bunshin wrote:Edit: Also, I got a funny linker error. Its a undefined refrence to the createDevice() function. Sup with that?
I guess you again forgot about the namespaces. ;)
It's

Code: Select all

irr::createDevice();
CuteAlien
Admin
Posts: 9733
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Post by CuteAlien »

Sounds like you are not linking to the irrlicht library.
For doxygen just look into the doxygen manual. It's easy to use.
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