Irrlicht problem in Linux (Ubuntu 8.10)

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
TnTonly
Posts: 14
Joined: Mon May 12, 2008 5:14 pm
Location: Hanoi
Contact:

Irrlicht problem in Linux (Ubuntu 8.10)

Post by TnTonly »

I'm just new to Linux. Currently I have encountered a trouble, after compiling Irrlicht according to this tutorial:
http://www.irrlicht3d.org/wiki/index.ph ... uildUbuntu
and this
http://www.irrlicht3d.org/wiki/index.ph ... ingOnLinux

It all seems to be ok. But when I build my Irrlicht HelloWorld, these error show up

Code: Select all

/usr/local/lib/libIrrlicht.a(CIrrDeviceLinux.o): In function `irr::CIrrDeviceLinux::getVideoModeList()':
/home/tntonly/.devapi/irrlicht/source/Irrlicht/CIrrDeviceLinux.cpp:1077: undefined reference to `XOpenDisplay'
/home/tntonly/.devapi/irrlicht/source/Irrlicht/CIrrDeviceLinux.cpp:1113: undefined reference to `XRRQueryExtension'
/home/tntonly/.devapi/irrlicht/source/Irrlicht/CIrrDeviceLinux.cpp:1116: undefined reference to `XRRGetScreenInfo'
/home/tntonly/.devapi/irrlicht/source/Irrlicht/CIrrDeviceLinux.cpp:1117: undefined reference to `XRRConfigCurrentConfiguration'
/home/tntonly/.devapi/irrlicht/source/Irrlicht/CIrrDeviceLinux.cpp:1118: undefined reference to `XRRConfigSizes'
/home/tntonly/.devapi/irrlicht/source/Irrlicht/CIrrDeviceLinux.cpp:1126: undefined reference to `XRRFreeScreenConfigInfo'
/home/tntonly/.devapi/irrlicht/source/Irrlicht/CIrrDeviceLinux.cpp:1136: undefined reference to `XCloseDisplay'
...
(also happen with COpenGL*)
I'm not sure what it is. I have search over the net but no luck.
Spkka
Posts: 32
Joined: Fri Jan 02, 2009 8:30 am

Post by Spkka »

i had the same problem and found my problem here i think
http://irrlicht.sourceforge.net/phpBB2/ ... hp?t=11600

Could be somewhere else but i dont have the time to search because im at work atm

Good luck
Spkka
Posts: 32
Joined: Fri Jan 02, 2009 8:30 am

Post by Spkka »

TnTonly
Posts: 14
Joined: Mon May 12, 2008 5:14 pm
Location: Hanoi
Contact:

Post by TnTonly »

Thanks for your help. I have tried it, but no luck either.

Btw, I was able to compile Irrlicht, able to build the example, but when I code the HelloWorld and build, those error appear.

Any suggestion?
Spkka
Posts: 32
Joined: Fri Jan 02, 2009 8:30 am

Post by Spkka »

Did you try this?
Im not sure if its related to the XopenDevice and these others errors tho

Code: Select all

//! On some Linux systems the XF86 vidmode extension or X11 RandR are missing. Use these flags

//! to remove the dependencies such that Irrlicht will compile on those systems, too.

#if defined(LINUX) && !defined(__sun__)

#define _IRR_LINUX_X11_VIDMODE_

//#define _IRR_LINUX_X11_RANDR_

#endif

//Change it so that fourth and fifth lines look like this: 

//#define _IRR_LINUX_X11_VIDMODE_

#define _IRR_LINUX_X11_RANDR_
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

Yes, correct. If you enable the XRANDR suppor you need to link against -lXrandr.
TnTonly
Posts: 14
Joined: Mon May 12, 2008 5:14 pm
Location: Hanoi
Contact:

Post by TnTonly »

Yes, I did try it but no help.

Wait, what do you mean by "you need to link against -lXrandr", sorry but I just new to developing application on Linux. Still didn't get used to it.
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

You have to put the mentioned command line option to you LDFLAGS line. After all, your compiler needs to know that you want to use libXrandr.so and that's the way to do this. Read up on linker flags for gcc and search your computer for this library.
TnTonly
Posts: 14
Joined: Mon May 12, 2008 5:14 pm
Location: Hanoi
Contact:

Post by TnTonly »

Thanks for supporting me, some of those error disappear. Now it turns out to this:

Code: Select all


/home/tntonly/.devapi/irrlicht/source/Irrlicht/CIrrDeviceLinux.cpp:300: undefined reference to `glXQueryVersion'
/home/tntonly/.devapi/irrlicht/source/Irrlicht/CIrrDeviceLinux.cpp:330: undefined reference to `glXChooseFBConfig'
/home/tntonly/.devapi/irrlicht/source/Irrlicht/CIrrDeviceLinux.cpp:336: undefined reference to `glXChooseFBConfig'
/home/tntonly/.devapi/irrlicht/source/Irrlicht/CIrrDeviceLinux.cpp:342: undefined reference to `glXChooseFBConfig'
/home/tntonly/.devapi/irrlicht/source/Irrlicht/CIrrDeviceLinux.cpp:365: undefined reference to `glXChooseFBConfig'
/home/tntonly/.devapi/irrlicht/source/Irrlicht/CIrrDeviceLinux.cpp:371: undefined reference to `glXChooseFBConfig'
/usr/local/lib/libIrrlicht.a(CIrrDeviceLinux.o):/home/tntonly/.devapi/irrlicht/source/Irrlicht/CIrrDeviceLinux.cpp:377: more undefined references to `glXChooseFBConfig' follow
/usr/local/lib/libIrrlicht.a(CIrrDeviceLinux.o): In function `irr::CIrrDeviceLinux::createWindow()':
/home/tntonly/.devapi/irrlicht/source/Irrlicht/CIrrDeviceLinux.cpp:429: undefined reference to `glXGetVisualFromFBConfig'
/home/tntonly/.devapi/irrlicht/source/Irrlicht/CIrrDeviceLinux.cpp:449: undefined reference to `glXChooseVisual'
/home/tntonly/.devapi/irrlicht/source/Irrlicht/CIrrDeviceLinux.cpp:459: undefined reference to `glXChooseVisual'
/home/tntonly/.devapi/irrlicht/source/Irrlicht/CIrrDeviceLinux.cpp:464: undefined reference to `glXChooseVisual'
/home/tntonly/.devapi/irrlicht/source/Irrlicht/CIrrDeviceLinux.cpp:579: undefined reference to `glXCreateWindow'
...
and some COpenGLDriver

Code: Select all

/usr/local/lib/libIrrlicht.a(COpenGLDriver.o): In function `irr::video::COpenGLDriver::deleteAllDynamicLights()':
/home/tntonly/.devapi/irrlicht/source/Irrlicht/COpenGLDriver.cpp:2228: undefined reference to `glDisable'
/usr/local/lib/libIrrlicht.a(COpenGLDriver.o): In function `irr::video::COpenGLDriver::uploadClipPlane(unsigned int)':
/home/tntonly/.devapi/irrlicht/source/Irrlicht/COpenGLDriver.cpp:2980: undefined reference to `glClipPlane'
/usr/local/lib/libIrrlicht.a(COpenGLDriver.o): In function `irr::video::COpenGLDriver::enableClipPlane(unsigned int, bool)':
/home/tntonly/.devapi/irrlicht/source/Irrlicht/COpenGLDriver.cpp:2994: undefined reference to `glEnable'
/home/tntonly/.devapi/irrlicht/source/Irrlicht/COpenGLDriver.cpp:2998: undefined reference to `glDisable'
/usr/local/lib/libIrrlicht.a(COpenGLDriver.o): In function `irr::video::COpenGLDriver::clearZBuffer()':
/home/tntonly/.devapi/irrlicht/source/Irrlicht/COpenGLDriver.cpp:2855: undefined reference to `glGetBooleanv'
..
EDIT: Well, I've just add one more libglut.so, and every errors disappear. The HelloWord is able to compile properly. Thanks everyone ^^
Post Reply