Page 1 of 2

Linux Problems (Was quite simple)

Posted: Thu Aug 09, 2007 12:52 am
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

Re: Linux Problems (should be simple)

Posted: Thu Aug 09, 2007 1:12 am
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.

Posted: Thu Aug 09, 2007 1:15 am
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.

Posted: Thu Aug 09, 2007 1:28 am
by CuteAlien
You must add

Code: Select all

using namespace irr;
or write irr::IrrlichtDevice

Posted: Thu Aug 09, 2007 1:29 am
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!

Posted: Thu Aug 09, 2007 7:22 am
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 :)

Posted: Thu Aug 09, 2007 3:22 pm
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. :)

Posted: Thu Aug 09, 2007 3:35 pm
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.

Posted: Thu Aug 09, 2007 3:43 pm
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.

Posted: Thu Aug 09, 2007 4:06 pm
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.

Posted: Thu Aug 09, 2007 4:46 pm
by rooly
i know gnome and kde both have chm viewers made. your just gonna have to find them.

Posted: Thu Aug 09, 2007 8:47 pm
by Wyszo
GnoCHM

Posted: Thu Aug 09, 2007 10:04 pm
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?

Posted: Thu Aug 09, 2007 10:42 pm
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();

Posted: Thu Aug 09, 2007 10:52 pm
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.