Tutorilals fail to compile

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
Anon.

Tutorilals fail to compile

Post by Anon. »

Hi,

I'm completely new to Irrlicht but I'm starting a project using it. I'm just trying to work through the tutorials before doing my own thing, but I can't compile them on my home machine. Its running Debian 3.0r1 with a vanilla 2.4.22 kernel. I've seen it compile on Redhat 7.2 machines (which I don't own so didn't setup) and a linux server (disto unknown). The errors I get are:

% make
g++ main.cpp -o example -I"../../include" -I"/usr/X11R6/include" -L"/usr/X11R6/lib" -L"../../lib/Linux" -lIrrlicht -lGL -lXxf86vm -lXext -lX11 -lz -ljpeg
In file included from ../../include/IMeshBuffer.h:9,
from ../../include/IMesh.h:9,
from ../../include/IAnimatedMesh.h:9,
from ../../include/irrlicht.h:32,
from main.cpp:28:
../../include/SMaterial.h:161: anonymous class type not used to declare any objects
../../include/SMaterial.h:202: anonymous class type not used to declare any objects
../../include/SMaterial.h: In method `irr::video::SMaterial::SMaterial()':
../../include/SMaterial.h:121: class `irr::video::SMaterial' does not have any field named `Texture1'../../include/SMaterial.h:121: class `irr::video::SMaterial' does not have any field named `Texture2'../../include/SMaterial.h:122: class `irr::video::SMaterial' does not have any field named `Wireframe'
../../include/SMaterial.h:122: class `irr::video::SMaterial' does not have any field named `Lighting'../../include/SMaterial.h:123: class `irr::video::SMaterial' does not have any field named `ZBuffer'
../../include/SMaterial.h:123: class `irr::video::SMaterial' does not have any field named `ZWriteEnable'
../../include/SMaterial.h:123: class `irr::video::SMaterial' does not have any field named `BackfaceCulling'
../../include/SMaterial.h:124: class `irr::video::SMaterial' does not have any field named `GouraudShading'
../../include/SMaterial.h:124: class `irr::video::SMaterial' does not have any field named `BilinearFilter'
../../include/SMaterial.h:125: class `irr::video::SMaterial' does not have any field named `TrilinearFilter'
../../include/SMaterial.h:125: class `irr::video::SMaterial' does not have any field named `ClampTextureCooridnates'
make: *** [all] Error 1

I've got the latest download from irrlicht.sourceforge.net. Do I need to upgrade something within my setup or something?

M
Mark

Re: Tutorial not compiling

Post by Mark »

Hi,

A quick update on my thought on this problem. I've tried compiling on my redhat 7.3 server, and it gets through to the linking stage.. hence I've deduced that g++ 2.95.4 doesn't like the syntax of the union{ struct{ ... }; bool[]; } } for field declaration, while 2.96 can handle it. I'm not sure about this linking problem.. I'll take a look.. probably after an upgrade of gcc... if I can stomach that!

Just in case you're wonderring about the linking issue:

/tmp/cc7ano1f.o: In function `main':
/tmp/cc7ano1f.o(.text+0x3a): undefined reference to `irr::createDevice(irr::video::EDriverType, irr::core::dimension2d<int> const &, unsigned int, bool, bool, irr::IEventReceiver *)'

This is on a redhat 7.3 server (again 2.4.22) tho I'm not too concerned until I get back to working on my main machine...

Cheers,

M
t

Post by t »

It sounds to me like it might be fixed by upgrading gcc
niko
Site Admin
Posts: 1759
Joined: Fri Aug 22, 2003 4:44 am
Location: Vienna, Austria
Contact:

Post by niko »

Yes, it should work with g++3.2.. I should really write this down somewhere in the next version.
mark
Posts: 2
Joined: Sat Oct 25, 2003 2:12 am
Location: Bristol
Contact:

Post by mark »

Ouch... all the way up to gcc3.2. That's a big jump to put a linux box through (especially a debian box that shipped with a 2.2.20 kernel). Does it completely fail on all gcc2.9x's, or is it still possible to compile with gcc-2.96 or something?

I could switch to Gentoo linux to get a gcc3.2 system (and then finding a way to downgrade Gnome 2 to Gnome 1.4!) - but I can't do that the the other machine I need to run it on... I've got stacks of redhat 7.2 machines I could really do with working on (gcc2.96 I beleive).

Cheers for your help so far...

Mark
> S-Cabs 3007 motion pod project
> Rubiks Cube (D'n'B) Mondays 9pm-2am Bar Latino, Bristol
mark
Posts: 2
Joined: Sat Oct 25, 2003 2:12 am
Location: Bristol
Contact:

Cheers!

Post by mark »

Well actually that wasn't as horrific as I imagined it would be.

Thanx for you help... Time for a little GUI tweaking (me and my crazy idea for circular windows... :roll: )

Mark
> S-Cabs 3007 motion pod project
> Rubiks Cube (D'n'B) Mondays 9pm-2am Bar Latino, Bristol
dbu
Posts: 7
Joined: Mon Dec 01, 2003 4:36 pm
Contact:

Linking Problems with gcc-3.3.2

Post by dbu »

hello all,

it would really be good if there would be a note about the gcc version required in the readme - and even better if it could compile with gcc-2.95 as i.e. debian woody (the latest stable release) uses this version and other older linux installations.

i ended by installing gcc-3.3.2 in parallel of gcc-2.95.4 (write if you want me to post how i did...)
i can successfully compile all examples (except Techdemo which has no makefile :-(

but i tried to compile some other application and get
$ /opt/gcc-3.3.2/bin/g++-3.3.2 Camera.o Main.o -o test -L"/usr/X11R6/lib" -L"../../irrlicht-0.4/lib/Linux" -lIrrlicht -lGL -lXxf86vm -lXext -lX11 -lz -ljpeg

Main.o(.text+0xdd): undefined reference to `irr::createDevice(irr::video::EDriverType, irr::core::dimension2d<int> const&, unsigned, bool, bool, irr::IEventReceiver*, wchar_t const*)'

mark, what did you do to resolve your linking problem?
i know that the irrlicht library is found, because gcc complains when it does not find it.
Kaili

Post by Kaili »

Hi to all of you!

I've got the same problems like dbu. I'm using Suse9.0. The gcc version is 3.2 or something like that. To compile i use the command:

g++ -I"...path to my irrlicht includes..." -L"... Path to the irrlicht libs..." main.cpp

Hope that's quite all right. When compiling one of the tutorials
there's a similar text:
undefined reference to `irr::createDevice(irr::video::EDriverType, irr::core::dimension2d<int> const&, unsigned, bool, bool, irr::IEventReceiver*)'

Thanks for helping!!!!!
dbu
Posts: 7
Joined: Mon Dec 01, 2003 4:36 pm
Contact:

Post by dbu »

Well, my linking problems just went away :-)
If you just installed gcc , you maybe have to call ldconfig - and you have to make shure the right versions of the standard libraries are used.
Post Reply