Irrlicht in Arch Linux

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.
Post Reply
ragnatic
Posts: 14
Joined: Sun Nov 22, 2009 5:11 am

Irrlicht in Arch Linux

Post by ragnatic »

In the past I've used Irrlicht in Ubuntu distros with not a major problem. Now I'm using Arch (x86_64), which is a great distro, and I need to use Irrlicht again.

The compiling went smooth and I can even make the examples and run them but, just to try the compiler, I tried to compile the first example it in Codeblocks and got a bunch of errors retaled to CIrrDeviceLinux.

I followed this guide http://irrlicht3d.org/wiki/index.php?n= ... cksOnLinux and in linker settings I added the libraries mentioned in "compiled it normally". In the linker tab of search directories I only added the lib/Linux folder of Irrlicht.

Thanks in advance.
CuteAlien
Admin
Posts: 9734
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Re: Irrlicht in Arch Linux

Post by CuteAlien »

We really can't help you unless you actually give us the exact errors.
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
ragnatic
Posts: 14
Joined: Sun Nov 22, 2009 5:11 am

Re: Irrlicht in Arch Linux

Post by ragnatic »

Sorry about that. Here it is.


-------------- Build: Release in Prueba ---------------

Linking console executable: bin/Release/Prueba
/home/ragnarch/Programar/irrlicht-1.7.2/lib/Linux/libIrrlicht.a(CIrrDeviceLinux.o): In function `~CIrrDeviceLinux':
/irrlicht-1.7.2/source/Irrlicht/CIrrDeviceLinux.cpp:131: undefined reference to `XFree'
/irrlicht-1.7.2/source/Irrlicht/CIrrDeviceLinux.cpp:141: undefined reference to `glXMakeContextCurrent'
/irrlicht-1.7.2/source/Irrlicht/CIrrDeviceLinux.cpp:146: undefined reference to `glXMakeCurrent'
/irrlicht-1.7.2/source/Irrlicht/CIrrDeviceLinux.cpp:149: undefined reference to `glXDestroyContext'
/irrlicht-1.7.2/source/Irrlicht/CIrrDeviceLinux.cpp:151: undefined reference to `glXDestroyWindow'
/irrlicht-1.7.2/source/Irrlicht/CIrrDeviceLinux.cpp:163: undefined reference to `XDestroyWindow'
/irrlicht-1.7.2/source/Irrlicht/CIrrDeviceLinux.cpp:164: undefined reference to `XCloseDisplay'
/irrlicht-1.7.2/source/Irrlicht/CIrrDeviceLinux.cpp:168: undefined reference to `XFree'
/irrlicht-1.7.2/source/Irrlicht/CIrrDeviceLinux.cpp:131: undefined reference to `XFree'
/irrlicht-1.7.2/source/Irrlicht/CIrrDeviceLinux.cpp:141: undefined reference to `glXMakeContextCurrent'
/irrlicht-1.7.2/source/Irrlicht/CIrrDeviceLinux.cpp:146: undefined reference to `glXMakeCurrent'
/irrlicht-1.7.2/source/Irrlicht/CIrrDeviceLinux.cpp:149: undefined reference to `glXDestroyContext'
/irrlicht-1.7.2/source/Irrlicht/CIrrDeviceLinux.cpp:151: undefined reference to `glXDestroyWindow'
/irrlicht-1.7.2/source/Irrlicht/CIrrDeviceLinux.cpp:163: undefined reference to `XDestroyWindow'
/irrlicht-1.7.2/source/Irrlicht/CIrrDeviceLinux.cpp:164: undefined reference to `XCloseDisplay'
/irrlicht-1.7.2/source/Irrlicht/CIrrDeviceLinux.cpp:168: undefined reference to `XFree'
/home/ragnarch/Programar/irrlicht-1.7.2/lib/Linux/libIrrlicht.a(CIrrDeviceLinux.o): In function `irr::IrrPrintXError(_XDisplay*, XErrorEvent*)':
/irrlicht-1.7.2/source/Irrlicht/CIrrDeviceLinux.cpp:191: undefined reference to `XGetErrorDatabaseText'
/irrlicht-1.7.2/source/Irrlicht/CIrrDeviceLinux.cpp:192: undefined reference to `XGetErrorText'
/home/ragnarch/Programar/irrlicht-1.7.2/lib/Linux/libIrrlicht.a(CIrrDeviceLinux.o): In function `irr::CIrrDeviceLinux::switchToFullscreen(bool)':
/irrlicht-1.7.2/source/Irrlicht/CIrrDeviceLinux.cpp:209: undefined reference to `XF86VidModeSwitchToMode'
/irrlicht-1.7.2/source/Irrlicht/CIrrDeviceLinux.cpp:210: undefined reference to `XF86VidModeSetViewPort'
/irrlicht-1.7.2/source/Irrlicht/CIrrDeviceLinux.cpp:231: undefined reference to `XF86VidModeQueryExtension'
/irrlicht-1.7.2/source/Irrlicht/CIrrDeviceLinux.cpp:237: undefined reference to `XF86VidModeGetAllModeLines'
/irrlicht-1.7.2/source/Irrlicht/CIrrDeviceLinux.cpp:257: undefined reference to `XF86VidModeSwitchToMode'
/irrlicht-1.7.2/source/Irrlicht/CIrrDeviceLinux.cpp:258: undefined reference to `XF86VidModeSetViewPort'
/irrlicht-1.7.2/source/Irrlicht/CIrrDeviceLinux.cpp:267: undefined reference to `XFree'
/home/ragnarch/Programar/irrlicht-1.7.2/lib/Linux/libIrrlicht.a(CIrrDeviceLinux.o): In function `irr::CIrrDeviceLinux::createWindow()':
/irrlicht-1.7.2/source/Irrlicht/CIrrDeviceLinux.cpp:346: undefined reference to `XSetErrorHandler'
/irrlicht-1.7.2/source/Irrlicht/CIrrDeviceLinux.cpp:349: undefined reference to `XOpenDisplay'
/irrlicht-1.7.2/source/Irrlicht/CIrrDeviceLinux.cpp:353: undefined reference to `XDisplayName'
/irrlicht-1.7.2/source/Irrlicht/CIrrDeviceLinux.cpp:354: undefined reference to `XDisplayName'
/irrlicht-1.7.2/source/Irrlicht/CIrrDeviceLinux.cpp:371: undefined reference to `glXQueryExtension'
/irrlicht-1.7.2/source/Irrlicht/CIrrDeviceLinux.cpp:372: undefined reference to `glXQueryVersion'
/irrlicht-1.7.2/source/Irrlicht/CIrrDeviceLinux.cpp:378: undefined reference to `glXGetProcAddress'
/irrlicht-1.7.2/source/Irrlicht/CIrrDeviceLinux.cpp:521: undefined reference to `XFree'
/irrlicht-1.7.2/source/Irrlicht/CIrrDeviceLinux.cpp:525: undefined reference to `glXGetProcAddress'
/irrlicht-1.7.2/source/Irrlicht/CIrrDeviceLinux.cpp:554: undefined reference to `glXChooseVisual'
/irrlicht-1.7.2/source/Irrlicht/CIrrDeviceLinux.cpp:562: undefined reference to `glXChooseVisual'
/irrlicht-1.7.2/source/Irrlicht/CIrrDeviceLinux.cpp:568: undefined reference to `glXChooseVisual'
/irrlicht-1.7.2/source/Irrlicht/CIrrDeviceLinux.cpp:593: undefined reference to `XGetVisualInfo'
/irrlicht-1.7.2/source/Irrlicht/CIrrDeviceLinux.cpp:601: undefined reference to `XCloseDisplay'
/irrlicht-1.7.2/source/Irrlicht/CIrrDeviceLinux.cpp:614: undefined reference to `XCreateColormap'
/irrlicht-1.7.2/source/Irrlicht/CIrrDeviceLinux.cpp:634: undefined reference to `XCreateWindow'
/irrlicht-1.7.2/source/Irrlicht/CIrrDeviceLinux.cpp:635: undefined reference to `XMapRaised'
/irrlicht-1.7.2/source/Irrlicht/CIrrDeviceLinux.cpp:638: undefined reference to `XInternAtom'
/irrlicht-1.7.2/source/Irrlicht/CIrrDeviceLinux.cpp:639: undefined reference to `XSetWMProtocols'
/irrlicht-1.7.2/source/Irrlicht/CIrrDeviceLinux.cpp:642: undefined reference to `XSetInputFocus'
/irrlicht-1.7.2/source/Irrlicht/CIrrDeviceLinux.cpp:644: undefined reference to `XGrabKeyboard'
/irrlicht-1.7.2/source/Irrlicht/CIrrDeviceLinux.cpp:647: undefined reference to `XGrabPointer'
/irrlicht-1.7.2/source/Irrlicht/CIrrDeviceLinux.cpp:649: undefined reference to `XWarpPointer'
/irrlicht-1.7.2/source/Irrlicht/CIrrDeviceLinux.cpp:663: undefined reference to `XCreateWindow'
/irrlicht-1.7.2/source/Irrlicht/CIrrDeviceLinux.cpp:666: undefined reference to `XGetWindowAttributes'
Process terminated with status 1 (0 minutes, 2 seconds)
50 errors, 0 warnings
Virion
Competition winner
Posts: 2148
Joined: Mon Dec 18, 2006 5:04 am

Re: Irrlicht in Arch Linux

Post by Virion »

you have to install X11 library, libx11-dev if i'm not mistaken (I'm not on linux now can't check for you)
CuteAlien
Admin
Posts: 9734
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Re: Irrlicht in Arch Linux

Post by CuteAlien »

Just to get that right - you _can_ compile on console? It is only failing in codeblocks?
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
ragnatic
Posts: 14
Joined: Sun Nov 22, 2009 5:11 am

Re: Irrlicht in Arch Linux

Post by ragnatic »

CuteAlien wrote:Just to get that right - you _can_ compile on console? It is only failing in codeblocks?
Well, I was only referring to the make of the examples, not compiling. My bad. I can run the examples just fine.

This libx11-dev is not available in pacman.
CuteAlien
Admin
Posts: 9734
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Re: Irrlicht in Arch Linux

Post by CuteAlien »

Sorry, I don't get what you mean. How can you make examples without compiling?
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
wahagn
Posts: 186
Joined: Sat Dec 06, 2008 5:11 pm
Location: Zundert (Netherlands)

Re: Irrlicht in Arch Linux

Post by wahagn »

I think he means that he is able to run the examples but not compile them... I guess
“Any code of your own that you haven’t looked at for six or more months might as well have been written by someone else.”
(Eagleson’s Law)
ragnatic
Posts: 14
Joined: Sun Nov 22, 2009 5:11 am

Re: Irrlicht in Arch Linux

Post by ragnatic »

If doing a make is in fact compiling then yes. make is always succesful and I can run the binary in the bin/Linux folder. The thing is when I click "compile" in Codeblocks with, let's say, the code of the first example in a new project. That fails and I get the errors shown above.
CuteAlien
Admin
Posts: 9734
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Re: Irrlicht in Arch Linux

Post by CuteAlien »

If you call make inside the examples folder then you do indeed compile the examples.
Did you try the code::blocks project file coming with Irrlicht or did you make your own project file?
If you make your own then take a look at the linker settings in the project build settings in an Irrlicht-examples. Your project should basically look the same.
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
Iyad
Posts: 140
Joined: Sat Mar 07, 2009 1:18 am
Location: Montreal, Canada

Re: Irrlicht in Arch Linux

Post by Iyad »

if he executed the examples than he compiled them because examples aren't precompiled when you download irrlicht source.
my guess is that you forgot to link -lx11. you probably forgot some more but ill check this for you when ill be back home i already set up code::blocks and irrlicht on archlinux.
#include <Iyad.h>
ragnatic
Posts: 14
Joined: Sun Nov 22, 2009 5:11 am

Re: Irrlicht in Arch Linux

Post by ragnatic »

Finally I got what was wrong. CuteAlien and lyad coments made me look what I had in linker settings. And then I realized my noob mistake... In linker settings I didn't add, one by one, all those libs. I just added all in a single "add library" dialog (Please don't kill me). Thank you all for you effort at helping me.

I have one more question regarding Codeblocks. I can compile but when I run it inside Codeblocks the program seems to get lost at finding the binary just created. I think this has to something to do with the Execution working dir location in Build targets. Even setting it to bin/Release/ doens't work. I get no errors running the binary in the terminal.
CuteAlien
Admin
Posts: 9734
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Re: Irrlicht in Arch Linux

Post by CuteAlien »

It should use the output filename. And execution working directory sets the working path on startup - which is more important to find data.
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