Can't Compile on 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
MattS
Posts: 1
Joined: Sat Nov 06, 2004 6:43 pm
Contact:

Can't Compile on Linux

Post by MattS »

after unzipping source.zip and going into the directory i ran make and i get these errors:
Using the latest version of irrlicht (0.7)

Code: Select all

In file included from S2DVertex.h:8,
                 from IK3DTriangleRenderer.h:10,
                 from CTRTextureGouraud.h:8,
                 from CTRFlat.cpp:5:
include/vector2d.h: In member function `irr::f64 irr::core::vector2d<T>::getDistanceFrom(const irr::core::vector2d<T>&) const':
include/vector2d.h:71: error: there are no arguments to `sqrt' that depend on a template parameter, so a declaration of `sqrt' must be available
include/vector2d.h:71: error: (if you use `-fpermissive', G++ will accept your code, but allowing the use of an undeclared name is deprecated)
include/vector2d.h: In member function `void irr::core::vector2d<T>::rotateBy(irr::f64, const irr::core::vector2d<T>&)':
include/vector2d.h:77: error: `GRAD_PI2' undeclared (first use this function)
include/vector2d.h:77: error: (Each undeclared identifier is reported only once for each function it appears in.)
include/vector2d.h:78: error: there are no arguments to `cos' that depend on a template parameter, so a declaration of `cos' must be available
include/vector2d.h:79: error: there are no arguments to `sin' that depend on a template parameter, so a declaration of `sin' must be available
include/vector2d.h: In member function `irr::f64 irr::core::vector2d<T>::getAngle() const':
include/vector2d.h:113: error: there are no arguments to `sqrt' that depend on a template parameter, so a declaration of `sqrt' must be available
include/vector2d.h:113: error: `GRAD_PI' undeclared (first use this function)
include/vector2d.h: In member function `irr::f64 irr::core::vector2d<T>::getAngleWith(const irr::core::vector2d<T>&) const':
include/vector2d.h:142: error: there are no arguments to `sqrt' that depend on a template parameter, so a declaration of `sqrt' must be available
include/vector2d.h:142: error: `GRAD_PI' undeclared (first use this function)
make: *** [CTRFlat.o] Error 1
uname -a: Linux Apocalypse 2.6.9-ARCH #1 SMP Tue Oct 26 11:33:54 PDT 2004 i686 Pentium III (Katmai) GenuineIntel GNU/Linux
glibc version: glibc-2.3.3-2
gcc version: gcc-3.4.3-1

Yeah.... any help would be nice :S
darkliquid
Posts: 41
Joined: Sun Nov 09, 2003 10:12 am
Location: UK
Contact:

Post by darkliquid »

It looks like your math headers are wrong/missing somehow. I've not tested compiling Irrlicht with GCC 3.4.x so I'm not sure whether it will work or not, but look around for maths headers on your system and include them manually:

Code: Select all

fgrep -R 'GRAD_PI' /usr/include/*
That'll return any headers that have that define in, chances are, they will be linked to or include to define for sqrt, etc too.

Manually include this file into the irrlicht files that need it I guess.

As always, if using a distro, check that you have all the standard development packages installed, check and optional '-devel' packages to sdee whether they look like they will install maths related headers.
http://www.darkliquid.net - Blog, art, poetry
Post Reply