[fixed]Problem compiling with _IRR_COMPILE_WITH_X11_ off

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
tbaptista
Posts: 6
Joined: Wed Apr 04, 2007 10:53 pm

[fixed]Problem compiling with _IRR_COMPILE_WITH_X11_ off

Post by tbaptista »

Hi,

I am trying to compile Irrlicht 1.3 on a Linux server by turning off the _IRR_COMPILE_WITH_X11_ on IrrCompileConfig.h.

When I run make I get the error:

Code: Select all

CIrrDeviceLinux.h: In destructor 'virtual irr::CIrrDeviceLinux::CCursorControl::~CCursorControl()':
CIrrDeviceLinux.h:134: error: 'class irr::CIrrDeviceLinux' has no member named 'display'
CIrrDeviceLinux.h:134: error: 'gc' was not declared in this scope
CIrrDeviceLinux.h:134: error: 'XFreeGC' was not declared in this scope
make: *** [CIrrDeviceLinux.o] Error 1

The problem seems to be in the CIrrDeviceLinux.h
I tried to change the CCursorControl::~CCursorControl() to

Code: Select all

~CCursorControl()
{
#ifdef _IRR_COMPILE_WITH_X11_				
    XFreeGC(Device->display, gc);
    Device->drop();
#endif //_IRR_COMPILE_WITH_X11_
}
It seems to have worked. But as I never worked this deep inside Irrlicht I am not sure it is the correct way to fix.

Is this OK?

Tiago Baptista
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

Almost ok. You have to drop the device in all cases, so just ifdef the first line. This will be fixed in the next release, thanks for reporting.
Post Reply