Building IrrLicht with OpenGL without extensions fail.

You discovered a bug in the engine, and you are sure that it is not a problem of your code? Just post it in here. Please read the bug posting guidelines first.
Post Reply
kas1e
Posts: 212
Joined: Sun Jan 21, 2018 8:39 am

Building IrrLicht with OpenGL without extensions fail.

Post by kas1e »

Trying lately to build irrlich without opengl extensions, just like this:

#define _IRR_COMPILE_WITH_OPENGL_
#undef _IRR_OPENGL_USE_EXTPOINTER_

Irrlicht library compile, but when i trying to build any example and link with it , i have:

Code: Select all

 
../../lib/Linux/libIrrlicht.a(COpenGLDriver.o): In function `irr::video::COpenGLDriver::setPixelShaderConstant(float const*, int, int)':
COpenGLDriver.cpp:(.text+0xe10): undefined reference to `glProgramLocalParameter4fvARB'
../../lib/Linux/libIrrlicht.a(COpenGLDriver.o): In function `irr::video::COpenGLDriver::setVertexShaderConstant(float const*, int, int)':
COpenGLDriver.cpp:(.text+0xe8c): undefined reference to `glProgramLocalParameter4fvARB'
../../lib/Linux/libIrrlicht.a(COpenGLDriver.o): In function `irr::video::COpenGLDriver::addOcclusionQuery(irr::scene::ISceneNode*, irr::scene::IMesh const*)':
COpenGLDriver.cpp:(.text+0x63c4): undefined reference to `glGenQueriesARB'
../../lib/Linux/libIrrlicht.a(COpenGLDriver.o): In function `irr::video::COpenGLDriver::removeOcclusionQuery(irr::scene::ISceneNode*)':
COpenGLDriver.cpp:(.text+0x64f8): undefined reference to `glDeleteQueriesARB'
../../lib/Linux/libIrrlicht.a(COpenGLDriver.o): In function `irr::video::COpenGLDriver::updateOcclusionQuery(irr::scene::ISceneNode*, bool)':
COpenGLDriver.cpp:(.text+0x66ec): undefined reference to `glGetQueryObjectivARB'
COpenGLDriver.cpp:(.text+0x6754): undefined reference to `glGetQueryObjectivARB'
../../lib/Linux/libIrrlicht.a(COpenGLDriver.o): In function `irr::video::COpenGLDriver::runOcclusionQuery(irr::scene::ISceneNode*, bool)':
COpenGLDriver.cpp:(.text+0x6890): undefined reference to `glEndQueryARB'
COpenGLDriver.cpp:(.text+0x68c4): undefined reference to `glBeginQueryARB'
../../lib/Linux/libIrrlicht.a(COpenGLDriver.o): In function `irr::video::COpenGLDriver::renderArray(void const*, unsigned int, irr::scene::E_PRIMITIVE_TYPE, ir
::video::E_INDEX_TYPE)':
COpenGLDriver.cpp:(.text+0x6a5c): undefined reference to `glPointParameterfvARB'
COpenGLDriver.cpp:(.text+0x6a6c): undefined reference to `glPointParameterfARB'
COpenGLDriver.cpp:(.text+0x6a7c): undefined reference to `glPointParameterfARB'
../../lib/Linux/libIrrlicht.a(COpenGLDriver.o): In function `irr::video::COpenGLDriver::setRenderTargetEx(irr::video::IRenderTarget*, unsigned short, irr::vide
::SColor, float, unsigned char)':
COpenGLDriver.cpp:(.text+0x8514): undefined reference to `glDrawBuffersARB'
../../lib/Linux/libIrrlicht.a(COpenGLDriver.o): In function `irr::video::COpenGLDriver::genericDriverInit()':
COpenGLDriver.cpp:(.text+0xb674): undefined reference to `glProvokingVertex'
../../lib/Linux/libIrrlicht.a(COpenGLShaderMaterialRenderer.o): In function `irr::video::COpenGLShaderMaterialRenderer::~COpenGLShaderMaterialRenderer()':
COpenGLShaderMaterialRenderer.cpp:(.text+0x140): undefined reference to `glDeleteProgramsARB'
COpenGLShaderMaterialRenderer.cpp:(.text+0x1d8): undefined reference to `glDeleteProgramsARB'
../../lib/Linux/libIrrlicht.a(COpenGLShaderMaterialRenderer.o): In function `irr::video::COpenGLShaderMaterialRenderer::~COpenGLShaderMaterialRenderer()':
COpenGLShaderMaterialRenderer.cpp:(.text+0x518): undefined reference to `glDeleteProgramsARB'
COpenGLShaderMaterialRenderer.cpp:(.text+0x5cc): undefined reference to `glDeleteProgramsARB'
../../lib/Linux/libIrrlicht.a(COpenGLShaderMaterialRenderer.o): In function `irr::video::COpenGLShaderMaterialRenderer::~COpenGLShaderMaterialRenderer()':
COpenGLShaderMaterialRenderer.cpp:(.text+0x694): undefined reference to `glDeleteProgramsARB'
../../lib/Linux/libIrrlicht.a(COpenGLShaderMaterialRenderer.o):COpenGLShaderMaterialRenderer.cpp:(.text+0x740): more undefined references to `glDeleteProgramsA
B' follow
../../lib/Linux/libIrrlicht.a(COpenGLShaderMaterialRenderer.o): In function `irr::video::COpenGLShaderMaterialRenderer::OnSetMaterial(irr::video::SMaterial con
t&, irr::video::SMaterial const&, bool, irr::video::IMaterialRendererServices*)':
COpenGLShaderMaterialRenderer.cpp:(.text+0xabc): undefined reference to `glBindProgramARB'
COpenGLShaderMaterialRenderer.cpp:(.text+0xaf4): undefined reference to `glBindProgramARB'
../../lib/Linux/libIrrlicht.a(COpenGLShaderMaterialRenderer.o): In function `irr::video::COpenGLShaderMaterialRenderer::createVertexShader(char const*)':
COpenGLShaderMaterialRenderer.cpp:(.text+0x1a70): undefined reference to `glGenProgramsARB'
COpenGLShaderMaterialRenderer.cpp:(.text+0x1a80): undefined reference to `glBindProgramARB'
COpenGLShaderMaterialRenderer.cpp:(.text+0x1ab0): undefined reference to `glProgramStringARB'
COpenGLShaderMaterialRenderer.cpp:(.text+0x1af8): undefined reference to `glDeleteProgramsARB'
../../lib/Linux/libIrrlicht.a(COpenGLShaderMaterialRenderer.o): In function `irr::video::COpenGLShaderMaterialRenderer::createPixelShader(char const*)':
COpenGLShaderMaterialRenderer.cpp:(.text+0x1ce8): undefined reference to `glGenProgramsARB'
COpenGLShaderMaterialRenderer.cpp:(.text+0x1cfc): undefined reference to `glBindProgramARB'
COpenGLShaderMaterialRenderer.cpp:(.text+0x1d24): undefined reference to `glProgramStringARB'
COpenGLShaderMaterialRenderer.cpp:(.text+0x2694): undefined reference to `glDeleteProgramsARB'
../../lib/Linux/libIrrlicht.a(COpenGLSLMaterialRenderer.o): In function `irr::video::COpenGLSLMaterialRenderer::init(int&, char const*, char const*, char const
, irr::scene::E_PRIMITIVE_TYPE, irr::scene::E_PRIMITIVE_TYPE, unsigned int)':
COpenGLSLMaterialRenderer.cpp:(.text+0x2364): undefined reference to `glProgramParameteriARB'
COpenGLSLMaterialRenderer.cpp:(.text+0x2388): undefined reference to `glProgramParameteriARB'
COpenGLSLMaterialRenderer.cpp:(.text+0x23b8): undefined reference to `glProgramParameteriARB'
COpenGLSLMaterialRenderer.cpp:(.text+0x23d4): undefined reference to `glProgramParameteriARB'
../../lib/Linux/libIrrlicht.a(COpenGLSLMaterialRenderer.o): In function `T.673':
COpenGLSLMaterialRenderer.cpp:(.text+0x2568): undefined reference to `glProgramParameteriARB'
../../lib/Linux/libIrrlicht.a(COpenGLSLMaterialRenderer.o):COpenGLSLMaterialRenderer.cpp:(.text+0x258c): more undefined references to `glProgramParameteriARB'
follow
../../lib/Linux/libIrrlicht.a(COpenGLExtensionHandler.o): In function `irr::video::COpenGLExtensionHandler::initExtensions(bool)':
COpenGLExtensionHandler.cpp:(.text+0x95c): undefined reference to `glGetQueryivARB'
collect2: ld returned 1 exit status
Makefile:40: recipe for target 'all_linux' failed
make: *** [all_linux] Error 1
 
 
Is it expected that OpenGL version can't be compiled without extensions, or it is bug ?

Thanks !
CuteAlien
Admin
Posts: 9628
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Re: Building IrrLicht with OpenGL without extensions fail.

Post by CuteAlien »

I think _IRR_OPENGL_USE_EXTPOINTER_ maybe doesn't mean compile without extensions but compile without extension pointers. So it still needs the extensions just calls them with (dynamic) function pointers instead of linking to them statically.
That would also explain the linker errors you get.

But not sure, as I also see that it only includes glext.h when _IRR_OPENGL_USE_EXTPOINTER_ is set.
That again make it suspicious where your errors are from as without glext.h I don't know where GL_ARB_fragment_program would come from -and when that is not set you shouldn't get those linker errors (as code is then out-defined).

Anyway - guessing here. But my guess is that _IRR_OPENGL_USE_EXTPOINTER_ is basically meant to help working with different platforms where extensions are linked in different ways. Not meant to disable extensions completely.
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Post Reply