Error when compiling

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
ajdlinux
Posts: 9
Joined: Wed Apr 12, 2006 8:53 pm
Location: Australia

Error when compiling

Post by ajdlinux »

Hi, I'm getting this error when running make:

g++ -c COpenGLDriver.cpp -o COpenGLDriver.o -I"include/" -I"zlib/" -DIRRLICHT_EXPORTS=1
In file included from COpenGLDriver.cpp:11:
COpenGLMaterialRenderer.h: In member function `virtual void
irr::video::COpenGLMaterialRenderer_TRANSPARENT_VERTEX_ALPHA::OnSetMaterial(irr::video::SMaterial&,
const irr::video::SMaterial&, bool, irr::video::IMaterialRendererServices*)
':
COpenGLMaterialRenderer.h:177: error: invalid conversion from `int' to `GLenum'
COpenGLMaterialRenderer.h:178: error: invalid conversion from `int' to `GLenum'
COpenGLMaterialRenderer.h:180: error: invalid conversion from `int' to `GLenum'
COpenGLMaterialRenderer.h:181: error: invalid conversion from `int' to `GLenum'
COpenGLMaterialRenderer.h:182: error: invalid conversion from `int' to `GLenum'
COpenGLMaterialRenderer.h: In member function `virtual void
irr::video::COpenGLMaterialRenderer_TRANSPARENT_VERTEX_ALPHA::OnUnsetMaterial()
':
COpenGLMaterialRenderer.h:196: error: invalid conversion from `int' to `GLenum'
COpenGLMaterialRenderer.h:197: error: invalid conversion from `int' to `GLenum'
COpenGLMaterialRenderer.h:198: error: invalid conversion from `int' to `GLenum'
COpenGLMaterialRenderer.h:199: error: invalid conversion from `int' to `GLenum'
COpenGLMaterialRenderer.h:200: error: invalid conversion from `int' to `GLenum'
COpenGLMaterialRenderer.h:201: error: invalid conversion from `int' to `GLenum'
COpenGLMaterialRenderer.h: In member function `virtual void
irr::video::COpenGLMaterialRenderer_TRANSPARENT_ALPHA_CHANNEL::OnSetMaterial(irr::video::SMaterial&,
const irr::video::SMaterial&, bool, irr::video::IMaterialRendererServices*)
':
COpenGLMaterialRenderer.h:231: error: invalid conversion from `int' to `GLenum'
COpenGLMaterialRenderer.h:232: error: invalid conversion from `int' to `GLenum'
COpenGLMaterialRenderer.h:233: error: invalid conversion from `int' to `GLenum'
COpenGLMaterialRenderer.h:235: error: invalid conversion from `int' to `GLenum'
COpenGLMaterialRenderer.h:236: error: invalid conversion from `int' to `GLenum'
COpenGLMaterialRenderer.h: In member function `virtual void
irr::video::COpenGLMaterialRenderer_LIGHTMAP::OnSetMaterial(irr::video::SMaterial&,
const irr::video::SMaterial&, bool, irr::video::IMaterialRendererServices*)
':
COpenGLMaterialRenderer.h:335: error: invalid conversion from `int' to `GLenum'
COpenGLMaterialRenderer.h:336: error: invalid conversion from `int' to `GLenum'
COpenGLMaterialRenderer.h:337: error: invalid conversion from `int' to `GLenum'
COpenGLMaterialRenderer.h:345: error: invalid conversion from `int' to `GLenum'
COpenGLMaterialRenderer.h:346: error: invalid conversion from `int' to `GLenum'
COpenGLMaterialRenderer.h:347: error: invalid conversion from `int' to `GLenum'
COpenGLMaterialRenderer.h:350: error: invalid conversion from `int' to `GLenum'
COpenGLMaterialRenderer.h:352: error: invalid conversion from `int' to `GLenum'
COpenGLMaterialRenderer.h:354: error: invalid conversion from `int' to `GLenum'
COpenGLMaterialRenderer.h:355: error: invalid conversion from `int' to `GLenum'
COpenGLMaterialRenderer.h:357: error: invalid conversion from `int' to `GLenum'
COpenGLMaterialRenderer.h:358: error: invalid conversion from `int' to `GLenum'
COpenGLMaterialRenderer.h:361: error: invalid conversion from `int' to `GLenum'
COpenGLMaterialRenderer.h:364: error: invalid conversion from `int' to `GLenum'
COpenGLMaterialRenderer.h:366: error: invalid conversion from `int' to `GLenum'
COpenGLMaterialRenderer.h: In member function `virtual void
irr::video::COpenGLMaterialRenderer_DETAIL_MAP::OnSetMaterial(irr::video::SMaterial&,
const irr::video::SMaterial&, bool, irr::video::IMaterialRendererServices*)
':
COpenGLMaterialRenderer.h:401: error: invalid conversion from `int' to `GLenum'
COpenGLMaterialRenderer.h:408: error: invalid conversion from `int' to `GLenum'
COpenGLMaterialRenderer.h:410: error: invalid conversion from `int' to `GLenum'
COpenGLMaterialRenderer.h:411: error: invalid conversion from `int' to `GLenum'
COpenGLMaterialRenderer.h:413: error: invalid conversion from `int' to `GLenum'
COpenGLMaterialRenderer.h:414: error: invalid conversion from `int' to `GLenum'
COpenGLDriver.cpp: At global scope:
COpenGLDriver.cpp:245: error: parse error before `=' token
COpenGLDriver.cpp:246: error: parse error before `=' token
COpenGLDriver.cpp: In member function `void
irr::video::COpenGLDriver::loadExtensions()':
COpenGLDriver.cpp:412: error: `pGlActiveTextureARB' undeclared (first use this
function)
COpenGLDriver.cpp:412: error: (Each undeclared identifier is reported only once
for each function it appears in.)
COpenGLDriver.cpp:412: error: `PFNGLACTIVETEXTUREARBPROC' undeclared (first use
this function)
COpenGLDriver.cpp:413: error: parse error before `(' token
COpenGLDriver.cpp:415: error: `pGlClientActiveTextureARB' undeclared (first use
this function)
COpenGLDriver.cpp:415: error: `PFNGLCLIENTACTIVETEXTUREARBPROC' undeclared
(first use this function)
COpenGLDriver.cpp:416: error: parse error before `(' token
COpenGLDriver.cpp:507: error: invalid conversion from `int' to `GLenum'
COpenGLDriver.cpp: In member function `virtual void
irr::video::COpenGLDriver::setBasicRenderStates(const
irr::video::SMaterial&, const irr::video::SMaterial&, bool)':
COpenGLDriver.cpp:1478: error: invalid conversion from `int' to `GLenum'
COpenGLDriver.cpp:1488: error: invalid conversion from `int' to `GLenum'
COpenGLDriver.cpp: In member function `void
irr::video::COpenGLDriver::setRenderStates2DMode(bool, bool, bool)':
COpenGLDriver.cpp:1594: error: invalid conversion from `int' to `GLenum'
COpenGLDriver.cpp:1595: error: invalid conversion from `int' to `GLenum'
COpenGLDriver.cpp:1601: error: invalid conversion from `int' to `GLenum'
COpenGLDriver.cpp:1602: error: invalid conversion from `int' to `GLenum'
COpenGLDriver.cpp:1603: error: invalid conversion from `int' to `GLenum'
COpenGLDriver.cpp: In member function `virtual void
irr::video::COpenGLDriver::deleteAllDynamicLights()':
COpenGLDriver.cpp:1654: error: invalid conversion from `int' to `GLenum'
COpenGLDriver.cpp: In member function `virtual void
irr::video::COpenGLDriver::addDynamicLight(const irr::video::SLight&)':
COpenGLDriver.cpp:1684: error: invalid conversion from `s32' to `GLenum'
COpenGLDriver.cpp:1687: error: invalid conversion from `s32' to `GLenum'
COpenGLDriver.cpp:1689: error: invalid conversion from `s32' to `GLenum'
COpenGLDriver.cpp:1690: error: invalid conversion from `s32' to `GLenum'
COpenGLDriver.cpp:1699: error: invalid conversion from `s32' to `GLenum'
COpenGLDriver.cpp:1707: error: invalid conversion from `s32' to `GLenum'
COpenGLDriver.cpp:1714: error: invalid conversion from `s32' to `GLenum'
COpenGLDriver.cpp:1721: error: invalid conversion from `s32' to `GLenum'
COpenGLDriver.cpp:1726: error: invalid conversion from `s32' to `GLenum'
COpenGLDriver.cpp:1727: error: invalid conversion from `s32' to `GLenum'
COpenGLDriver.cpp:1728: error: invalid conversion from `s32' to `GLenum'
COpenGLDriver.cpp:1730: error: invalid conversion from `s32' to `GLenum'
COpenGLDriver.cpp: In member function `void
irr::video::COpenGLDriver::extGlActiveTextureARB(GLenum)':
COpenGLDriver.cpp:1967: error: `pGlActiveTextureARB' undeclared (first use this
function)
COpenGLDriver.cpp: In member function `void
irr::video::COpenGLDriver::extGlClientActiveTextureARB(GLenum)':
COpenGLDriver.cpp:1975: error: `pGlClientActiveTextureARB' undeclared (first use this function)
COpenGLDriver.cpp: In member function `virtual void
irr::video::COpenGLDriver::setVertexShaderConstant(f32*, int, int)':
COpenGLDriver.cpp:2178: error: invalid conversion from `int' to `GLenum'
COpenGLDriver.cpp:2178: error: initializing argument 1 of `void
irr::video::COpenGLDriver::extGlProgramLocalParameter4fvARB(GLenum, unsigned
int, const GLfloat*)'
COpenGLDriver.cpp: In member function `virtual void
irr::video::COpenGLDriver::setPixelShaderConstant(f32*, int, int)':
COpenGLDriver.cpp:2185: error: invalid conversion from `int' to `GLenum'
COpenGLDriver.cpp:2185: error: initializing argument 1 of `void
irr::video::COpenGLDriver::extGlProgramLocalParameter4fvARB(GLenum, unsigned
int, const GLfloat*)'
make: *** [COpenGLDriver.o] Error 1

Is this a syntax error or something? For the record I'm using g++ 3.4 from Debian with the mesa libraries instead of xlibmesa-gl, running XOrg 6.9.

andrew
hybrid

Post by hybrid »

If you're ugin separate libraires you have to make sure that all include paths are correctly set. It seems to be something's missing here. Or maybe you'll even need some additional includes in the source.
BTW: Wiht pure Mesa you won't get hardware acceleration, so don't expect more then 3-4 FPS!
ajdlinux
Posts: 9
Joined: Wed Apr 12, 2006 8:53 pm
Location: Australia

Post by ajdlinux »

hybrid wrote:If you're ugin separate libraires you have to make sure that all include paths are correctly set. It seems to be something's missing here. Or maybe you'll even need some additional includes in the source.
BTW: Wiht pure Mesa you won't get hardware acceleration, so don't expect more then 3-4 FPS!
OK I'll try fixing that.

BTW: Yes I know, which is why I want to try out the software renderer! (BTW2: No I won't install *any* proprietary drivers, not because the drivers themselves are bad but because they're proprietary!)

andrew
ajdlinux
Posts: 9
Joined: Wed Apr 12, 2006 8:53 pm
Location: Australia

Post by ajdlinux »

OK, I changed the makefile and added the GL folder for includes.

Compiler command becomes g++ -c COpenGLDriver.cpp -o COpenGLDriver.o -I"include/" -I"zlib/" -I/usr/include -I/usr/include/GL -DIRRLICHT_EXPORTS=1 and still fails with the same errors.

Is there any way to skip the OpenGL libraries when compiling?

Thanks,
andrew
ajdlinux
Posts: 9
Joined: Wed Apr 12, 2006 8:53 pm
Location: Australia

Post by ajdlinux »

ajdlinux wrote:OK, I changed the makefile and added the GL folder for includes.

Compiler command becomes g++ -c COpenGLDriver.cpp -o COpenGLDriver.o -I"include/" -I"zlib/" -I/usr/include -I/usr/include/GL -DIRRLICHT_EXPORTS=1 and still fails with the same errors.

Is there any way to skip the OpenGL libraries when compiling?

Thanks,
andrew
I figured out how to skip the GL option by editing IrrCompileConfig.h and it seems to compile, albeit without OpenGL.

thanks,
andrew
ajdlinux
Posts: 9
Joined: Wed Apr 12, 2006 8:53 pm
Location: Australia

Post by ajdlinux »

And now, after compiling it, the examples (using any of OpenGL, Irrlicht Software or Apfelbaum) complain that they cannot get visual. Is this something to do with X?

andrew
hybrid

Post by hybrid »

Did you apply all the Linux patches available on the patch page? Otherwise you won't be able to remove OpenGL completely. The standard Irrlicht uses some OpneGL methods to open the windows etc. Seems to be the case here.
And: No, you don't need the vendor drivers to use some hardware acceleration. The standard X drivers support a decent amount of hardware access. Thus, X.Org drivers should be much faster than the software rendered Irrlicht, or the software emulated OpenGL.
ajdlinux
Posts: 9
Joined: Wed Apr 12, 2006 8:53 pm
Location: Australia

Post by ajdlinux »

hybrid wrote:Did you apply all the Linux patches available on the patch page? Otherwise you won't be able to remove OpenGL completely. The standard Irrlicht uses some OpneGL methods to open the windows etc. Seems to be the case here.
And: No, you don't need the vendor drivers to use some hardware acceleration. The standard X drivers support a decent amount of hardware access. Thus, X.Org drivers should be much faster than the software rendered Irrlicht, or the software emulated OpenGL.
With the drivers: Yes, but not for nvidia cards - I know that older radeons and some others are supported directly by DRI. Anyway I want to get his working because I want to distribute a game to people who don't have hardware acceleration.

Patches: I'll try them.

Thanks anyway,
Andrew
Post Reply