Building Problems Under 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
Janko-carina
Posts: 2
Joined: Mon Feb 06, 2006 9:18 pm

Building Problems Under Linux

Post by Janko-carina »

Hi All I'm quite new to Irrlicht and I'm trying to make it work uder linux. I use Anjuta as IDE I've made a base consolle project, I've set all the path well (i hope), Ive tried to compile the hello world project and it did compile, but when I've tried to build it I had a lot (really a lot) of errors like this one:

Code: Select all

/media/hda5/irrlicht-0.14.0/lib/Linux/libIrrlicht.a(CIrrDeviceLinux.o): In function `irr::CIrrDevice Linux::~CIrrDevice Linux()'
...
CIrrDeviceLinux.cpp(.text+0xb21):undefined reference to `glXDestroyContext'
...
COpenGLDriver.cpp:(.text+0x15d0): undefined reference to `glDepthMask'
Can someone please help me?

Thank You

Janko
hybrid

Post by hybrid »

You're not linking against OpenGL libraries. Check the example directory of irrlicht. Every Makefile contains the complete set of g++ options to link the final executable. You will definitely need -lGL
afecelis
Admin
Posts: 3075
Joined: Sun Feb 22, 2004 10:44 pm
Location: Colombia
Contact:

Post by afecelis »

I wouldn't recommend anjuta to compile the engine nor for projects.

To compile the engine simply open a shell window where you unzipped the source; an adequate makefile will be placed there. In the shell window type "make" and hit enter. If you got all the required libs, the compiling process will create "libIrrlicht.a" in the "linux" folder inside of "lib"

You will then be ready to compile projects.
Now for projects I'd suggest using either Scite (scintilla text editor) or Codeblocks (free ide).

With scite, make sure to have a copy of the makefile that comes with any of the examples (except the demo) since they're ready to work with any "main.cpp" file you got. Open your source in scite and then hit the "build" button. It will then look for the make file and compile your app.

You can grab a copy of scite here:
http://www.scintilla.org/SciTE.html
only drawback is you gotta compile it and it's got a high level of dependencies.
there's also an older version (1.61) rpm package here:
ftp://ftp.pbone.net/mirror/ftp.gwdg.de/ ... 1.i586.rpm
but careful with dependencies.

Codeblocks has got an Irrlicht project template which comes in very handy. There are binaries for different distros here:
http://forums.codeblocks.org/index.php/ ... 194.0.html

and then there's always the video drivers issue. There are some known iinconsistencies with opengl and some Nvidia cards. But there's a fix available.

one thing at a time!
:wink:
XAngel
Posts: 4
Joined: Mon Feb 06, 2006 9:07 pm
Location: Mafra, SC / Brasil
Contact:

Post by XAngel »

AlexL
Posts: 184
Joined: Tue Mar 02, 2004 6:06 pm
Location: Washington State

Post by AlexL »

Taken from here
Steve wrote:For me the editing of Makefile worked, I changed the line 7 to look like this:

Code: Select all

CXXINCS = -I"/usr/include/nvidia/" -I"include/" -I"zlib/"
I have nvidia-glx-devel (and other NVidia drivers) installed from rpm.livna.org.

But if that doesn't work, here's how I did it before I tried editing the Makefile:
First, in COpenGLDriver.cpp define this before #include's:

Code: Select all

#define  GLX_GLXEXT_LEGACY
then, near line 360, change the following:

Code: Select all

			#ifdef GLX_VERSION_1_4 
				glXGetProcAddress(reinterpret_cast<const GLubyte*>("glActiveTextureARB")); 
			#else 
				glXGetProcAddressARB(reinterpret_cast<const GLubyte*>("glActiveTextureARB")); 
			#endif
to something like:

Code: Select all

glXGetProcAddressARB(reinterpret_cast<const GLubyte*>("glActiveTextureARB")); 
or instead of removing lines, #undef GLX_VERSION_1_4 after #include's

Code: Select all

#undef GLX_VERSION_1_4

I'm also on FC4 with NVidia (or how is it spelled correctly), the problem with the standard includes in /usr/include/GL/ is that they are for GLX version 1.4 but the NVidia's GLX library is 1.3.


Regards,
Steve
Janko-carina
Posts: 2
Joined: Mon Feb 06, 2006 9:18 pm

Post by Janko-carina »

I have solved my problem. :D !!
First I had to install all dev versions of my ibraryes then i had to include all libs separately in my project.
Thank you to all

Janko
Post Reply