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 :
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
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