Most stuff that compiles for linux I can get to compile for bsd, at least the parts I need.
In this case I'm trying to compile some stuff for Linux with irrlicht. Now ive done a ton of this just using the includes for the typedefs etc.
But now I'm using the filesystem. The normal way of creating the filesystem is to use the device. Getting a device to build on bsd is proving to be a huge pain.
Is it possible to use the filesystem object without using the device as a class factory?
[Solved] FreeBSD/Linux Filesystem compile
[Solved] FreeBSD/Linux Filesystem compile
Last edited by madoc on Thu Nov 24, 2011 3:34 pm, edited 1 time in total.
Re: FreeBSD/Linux Filesystem compile
Nevermind, I got it working, anyone trying to compile on bsd few easy things:
- gmake, not make
- the linux device seems a bit funny in that it thinks x11 device is defined even when its not, i did an undef at the top of the file and I now have my lib, yippie
- gmake, not make
- the linux device seems a bit funny in that it thinks x11 device is defined even when its not, i did an undef at the top of the file and I now have my lib, yippie
-
- Admin
- Posts: 14143
- Joined: Wed Apr 19, 2006 9:20 pm
- Location: Oldenburg(Oldb), Germany
- Contact:
Re: [Solved] FreeBSD/Linux Filesystem compile
The X11_DEVICE should be defined, as this actually means Linux device. Due to historical reasons, the naming scheme was chosen like that. What should not be necessary is the USE_X11 define, as that is only required when rendering something.
Re: [Solved] FreeBSD/Linux Filesystem compile
Hmm, I only want the fallback device, I was excited when i saw it I never noticed it before. I just need a null device for things like the filesystem.
Doing
undef __IRR_COMPILE_WITH_X11_DEVICE didnt work so what I actually did was add that line to the top of the linux device.
I dont see a use_x11 in that file, just the compile with x11, and if its not defined it includes some stuff from X11 directory structure.
Doing
undef __IRR_COMPILE_WITH_X11_DEVICE didnt work so what I actually did was add that line to the top of the linux device.
I dont see a use_x11 in that file, just the compile with x11, and if its not defined it includes some stuff from X11 directory structure.
Re: [Solved] FreeBSD/Linux Filesystem compile
Ok I see what you mean, theres __IRR_COMPILE_WITH_X11_DEVICE and _IRR_COMPILE_WITH_X11_. You NEED a device, I didnt think it worked like that because in CIrrDeviceLinux.cpp there are x11 includes that arnt surrounded by __IRR_COMPILE_WITH_X11_ if I surround the includes and the atom namespaces with __IRR_COMPILE_WITH_X11_ and I ended up with a device that compiles but even works (well at least the filesystem stuff which is all I need )
Code: Select all
// Copyright (C) 2002-2010 Nikolaus Gebhardt
// This file is part of the "Irrlicht Engine".
// For conditions of distribution and use, see copyright notice in irrlicht.h
#include "CIrrDeviceLinux.h"
#ifdef _IRR_COMPILE_WITH_X11_DEVICE_
#include <stdio.h>
#include <stdlib.h>
#include <sys/utsname.h>
#include <time.h>
#include "IEventReceiver.h"
#include "os.h"
#include "CTimer.h"
#include "irrString.h"
#include "Keycodes.h"
#include "COSOperator.h"
#include "CColorConverter.h"
#include "SIrrCreationParameters.h"
#ifdef _IRR_COMPILE_WITH_X11
#include <X11/XKBlib.h>
#include <X11/Xatom.h>
#endif // _IRR_COMPILE_WITH_X11
#if defined _IRR_COMPILE_WITH_JOYSTICK_EVENTS_
#include <fcntl.h>
#include <unistd.h>
#ifdef __FREE_BSD_
#include <sys/joystick.h>
#else
// linux/joystick.h includes linux/input.h, which #defines values for various KEY_FOO keys.
// These override the irr::KEY_FOO equivalents, which stops key handling from working.
// As a workaround, defining _INPUT_H stops linux/input.h from being included; it
// doesn't actually seem to be necessary except to pull in sys/ioctl.h.
#define _INPUT_H
#include <sys/ioctl.h> // Would normally be included in linux/input.h
#include <linux/joystick.h>
#undef _INPUT_H
#endif
#endif // _IRR_COMPILE_WITH_JOYSTICK_EVENTS_
namespace irr
{
namespace video
{
IVideoDriver* createOpenGLDriver(const SIrrlichtCreationParameters& params,
io::IFileSystem* io, CIrrDeviceLinux* device);
}
} // end namespace irr
#ifdef _IRR_COMPILE_WITH_X11
namespace
{
Atom X_ATOM_CLIPBOARD;
Atom X_ATOM_TARGETS;
Atom X_ATOM_UTF8_STRING;
Atom X_ATOM_TEXT;
};
#endif //_IRR_COMPILE_WITH_X11
-
- Admin
- Posts: 14143
- Joined: Wed Apr 19, 2006 9:20 pm
- Location: Oldenburg(Oldb), Germany
- Contact:
Re: [Solved] FreeBSD/Linux Filesystem compile
I see. Guess CuteAlien will fix this then, moving to bug reports...
Re: [Solved] FreeBSD/Linux Filesystem compile
Fixed svn revision 4055. Note that you can use the filesystem also by using the null-device.
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
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm