[fixed]Compilation error when compiling 1.4.1 without OpenGL

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
jmpep
Posts: 32
Joined: Thu Jul 10, 2008 6:55 pm

[fixed]Compilation error when compiling 1.4.1 without OpenGL

Post by jmpep »

I hope this has not been posted already -I haven't found it-... my apologizes if it has.

When compiling Irrlicht 1.4.1 without OpenGL support -by commenting the _IRR_COMPILE_WITH_OPENGL_ macro definition in irrCompileConfig.h- an error is raised in COpenGLDriver.cpp in line 2361 due to HWND being undefined.

This is the easiest bug to solve in all times :P :

In COpenGLDriver.h replace (starting from line 10)

Code: Select all

#ifdef _IRR_COMPILE_WITH_OPENGL_

#include "CNullDriver.h"
#include "IMaterialRendererServices.h"
#include "COpenGLExtensionHandler.h"

#if defined(_IRR_WINDOWS_API_)
	#if defined(_IRR_WINDOWS_API_)
		// include windows headers for HWND
		#define WIN32_LEAN_AND_MEAN
		#include <windows.h>
	#endif
	#include <GL/gl.h>
	#include "glext.h"
#ifdef _MSC_VER
	#pragma comment(lib, "OpenGL32.lib")
	#pragma comment(lib, "GLu32.lib")
#endif
with:

Code: Select all

#if defined(_IRR_WINDOWS_API_)
	// include windows headers for HWND
	#define WIN32_LEAN_AND_MEAN
	#include <windows.h>
#endif

#ifdef _IRR_COMPILE_WITH_OPENGL_

#include "CNullDriver.h"
#include "IMaterialRendererServices.h"
#include "COpenGLExtensionHandler.h"

#if defined(_IRR_WINDOWS_API_)
	#include <GL/gl.h>
	#include "glext.h"
#ifdef _MSC_VER
	#pragma comment(lib, "OpenGL32.lib")
	#pragma comment(lib, "GLu32.lib")
#endif
Post Reply