Page 1 of 1

Makefiles Irrlicht examples -lXcursor

Posted: Tue Dec 25, 2012 11:59 am
by porcus
Hello,

when I tried to compile the Irrlicht examples of v1.8 it failed because -the Xcursor library could not be found.
Removing -lXcursor from the makefiles solved the problem. Propably it should also be removed from the official release?

greetings

Re: Makefiles Irrlicht examples -lXcursor

Posted: Tue Dec 25, 2012 2:49 pm
by ACE247
You can actually just install Xcursor library on linux, never had a problem with it. It's not needed all the time, but may be quite useful to someone in certain situations. So I don't think there is a reason to remove it.

Re: Makefiles Irrlicht examples -lXcursor

Posted: Wed Dec 26, 2012 1:37 am
by porcus
I have the Xcursor library installed (from the Ubuntu repository). Maybe there's something wrong with the repository. I don't know.

Re: Makefiles Irrlicht examples -lXcursor

Posted: Wed Dec 26, 2012 1:34 pm
by hybrid
It's not always requires to link against thos libs, as they may be included already in some Xextensions library. But in the simple Makefile situation that we use there's no place for such checks, hence you have to adapt the Makefile to your needs. XCursor is needed for the hardware cursor extensions integrated with Irrlicht 1.8

Re: Makefiles Irrlicht examples -lXcursor

Posted: Fri Dec 28, 2012 12:27 am
by CuteAlien
Linking against XCursor is currently not really needed as I disabled the _IRR_LINUX_XCURSOR_ by default again in IrrCompileConfig.h (to avoid breaking old projects). So yeah - I should probably kick this out of all the example files against - except maybe for the cursor-example.

And it's needed for color-cursors on X11 (monochrome hardware cursors are in X11, but real color support is still too futuristic for X11 ...).

Edit: Then again it's needed in all project files as soon as someone enabled the define. So maybe better to keep it.

Re: Makefiles Irrlicht examples -lXcursor

Posted: Fri Dec 28, 2012 11:11 am
by hendu
The file needs a macro to check for enabled features, to be able to dynamically add libs/flags based on that.

Re: Makefiles Irrlicht examples -lXcursor

Posted: Fri Dec 28, 2012 12:31 pm
by CuteAlien
Haha yeah - I guess we could do that for the makefiles. For IDE's it would only be possible using something like CMake... or maybe IDE-build systems are more flexible than I ever tried?

Re: Makefiles Irrlicht examples -lXcursor

Posted: Fri Dec 28, 2012 2:39 pm
by hybrid
Unfortunately, makefiles cannot check for defines enabled inside files (as in IrrCompileConfig.h), at least not cross-platform. Under Linux you could create some funky grep or awk command (which leads to some hand-made autoconfig in the end), but it's also hard to get a properly working version for all things (don't forget undefine etc...)

Re: Makefiles Irrlicht examples -lXcursor

Posted: Fri Dec 28, 2012 6:33 pm
by hendu
Yes, a cpp pipe to grep was my thoughts. cpp handles the undefines etc properly.

Re: Makefiles Irrlicht examples -lXcursor

Posted: Tue Mar 17, 2015 1:08 am
by chronologicaldot
Old thread, yes.

But for those who are interested, the wiki contains instructions on how to install Xcursor and all of the other necessary libraries for irrlicht on Linux:
http://irrlicht3d.org/wiki/index.php?n= ... ngIrrlicht

But for the impatient, enter the following into the Terminal to obtain and compile the necessary libraries for Linux:

Code: Select all

 
sudo apt-get -y install build-essential xserver-xorg-dev x11proto-xf86vidmode-dev libxxf86vm-dev mesa-common-dev libgl1-mesa-dev libglu1-mesa-dev libxext-dev libxcursor-dev
 
Note, you may have to switch users to root if sudo doesn't work (for whatever stupid reason).