Makefiles Irrlicht examples -lXcursor

You discovered a bug in the engine, and you are sure that it is not a problem of your code? Just post it in here. Please read the bug posting guidelines first.
Post Reply
porcus
Posts: 149
Joined: Sun May 27, 2007 6:24 pm
Location: Germany

Makefiles Irrlicht examples -lXcursor

Post 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
ACE247
Posts: 704
Joined: Tue Mar 16, 2010 12:31 am

Re: Makefiles Irrlicht examples -lXcursor

Post 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.
porcus
Posts: 149
Joined: Sun May 27, 2007 6:24 pm
Location: Germany

Re: Makefiles Irrlicht examples -lXcursor

Post by porcus »

I have the Xcursor library installed (from the Ubuntu repository). Maybe there's something wrong with the repository. I don't know.
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Re: Makefiles Irrlicht examples -lXcursor

Post 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
CuteAlien
Admin
Posts: 9734
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Re: Makefiles Irrlicht examples -lXcursor

Post 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.
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
hendu
Posts: 2600
Joined: Sat Dec 18, 2010 12:53 pm

Re: Makefiles Irrlicht examples -lXcursor

Post by hendu »

The file needs a macro to check for enabled features, to be able to dynamically add libs/flags based on that.
CuteAlien
Admin
Posts: 9734
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Re: Makefiles Irrlicht examples -lXcursor

Post 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?
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:

Re: Makefiles Irrlicht examples -lXcursor

Post 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...)
hendu
Posts: 2600
Joined: Sat Dec 18, 2010 12:53 pm

Re: Makefiles Irrlicht examples -lXcursor

Post by hendu »

Yes, a cpp pipe to grep was my thoughts. cpp handles the undefines etc properly.
chronologicaldot
Competition winner
Posts: 688
Joined: Mon Sep 10, 2012 8:51 am

Re: Makefiles Irrlicht examples -lXcursor

Post 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).
Post Reply