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.
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

You can use a plain doxygen config file. Or take the one from scripts/doc/irrlicht (is it just in SVN? I don't have a SDK at hand).
Dr.Bunshin
Posts: 34
Joined: Sat Mar 31, 2007 8:38 pm

Post by Dr.Bunshin »

Thanks guys, but I need more help.

randomMesh - No, its a linker error. I put using namespace irr anyways.

CuteAlien - I put -lIrrlicht, is that right?

hybrid - thanks, ill check SVN
CuteAlien
Admin
Posts: 9716
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Post by CuteAlien »

-lIrrlicht is only right when you have Irrlicht in your linkerpath.
Maybe you have to set that with -Lpath (like: -L../../lib/Linux)

I think the easiest way to start is to modify the examples. Just copy one of them in a new folder and put that besides the other examples. Now you have an already working project with a working Makefile. Even if you don't want to do that, you should maybe still take a look at those Makefiles, so you see which LDFLAGS are used.
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 »

Yay, used script to capture stuff!

Code: Select all

/tmp/ccUwbkC3.o(.text+0x76): In function `main':
: undefined reference to `irr::createDevice(irr::video::E_DRIVER_TYPE, irr::core::dimension2d<int> const&, unsigned, bool, bool, bool, irr::IEventReceiver*, char const*)'
collect2: ld returned 1 exit status
and compile script:

Code: Select all

 g++  -I/home/dsl/dev/sdk/irrlicht-1.3.1/include/ -Lsdk/irrlicht-1.3.1/lib/Linux/ -lIrrlicht main.cpp
So.. well, Im not demanding anything or even expecting anything. but if you want to help me, go ahead.
CuteAlien
Admin
Posts: 9716
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Post by CuteAlien »

I think you have one slash '/' too much at the end of the linker path. Also do check if the library really is 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
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

a slash too much does not matter. But the code to the library is relative while the include path is absolute. Maybe it links a wrong library or none at all? But it would usually error out if the lib is missing...
BTW: You can press both buttons at once to emulate a third button to copy stuff. And most apps also support CTRL-V for pasting the mouse selection.
Dr.Bunshin
Posts: 34
Joined: Sat Mar 31, 2007 8:38 pm

Post by Dr.Bunshin »

Hello Everyone! I hope you slept well

CuteAlien - I removed the slash but :( no go, Thanks anyways

hybrid - Yeah, I put -lIrrlichtm and it did error out so... You know, I did compile irrlicht my self, could I have done something wrong?

Ill be back online tonight, for the last night of my isolation/vacation and will be back on my main machine with all my familiar stuffs. That would be funny if I got it to work as I was pulling in the driveway.
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

You have to out -L/path/to/library first. It's best to use an absolute path to avoid directy change trouble. After that add a -lIrrlicht. That's all. Well, of course you have to add all the other libraries and paths for OpenGL and X11. Check the Makefiles for all necessary options.
Dr.Bunshin
Posts: 34
Joined: Sat Mar 31, 2007 8:38 pm

Post by Dr.Bunshin »

Well!

I stoled the makefiles from the examples and set the CXX var and Tadaa! Everything is working smoothly. Horay! Thanks for all the help hybrid, also, I put -lIrrlichtm because I wanted to see if it would error out. Heh, thanks again.
Post Reply