How can I develop a game with Irrlicht game engine in a cygwin environment?
I tried google, but honestly I didn't find any useful tutorials about setting that game engine in cygwin.
Thanks, Ehsan.
I highly recommend using MSYS2 instead of Cygwin. It is basically a well-maintained fork of Cygwin that includes ① the Mingw-w64 toolchain (basically, GCC for Windows), ② a robust package manager (pacman
from Arch Linux) and ③ packages for the Irrlicht engine.
Once MSYS2 is installed, you can install GCC and Irrlicht from an MSYS2 shell:
pacman -S mingw-w64-x86_64-gcc mingw-w64-x86_64-irrlicht
Here is a simple Irrlicht program that you can try; it just opens a window and clears the screen:
#include <irrlicht/irrlicht.h>
using namespace irr;
using namespace core;
using namespace video;
int main() {
IrrlichtDevice *device = createDevice(video::EDT_SOFTWARE, dimension2d<u32>(640, 480), 16, false, false, false, 0);
device->setWindowCaption(L"Hello World");
IVideoDriver* driver = device->getVideoDriver();
while (device->run()) {
driver->beginScene(true, true, SColor(255,100,101,140));
driver->endScene();
}
device->drop();
}
To compile your project from an MSYS2 shell:
/mingw64/bin/g++ example.cpp -lIrrlicht -o example.exe
And to launch it:
./example.exe
MINGW
isn't an option for me :(
\$\endgroup\$
MINGW
, just I have developed some part of the game like audio in some libraries which are for cygwin
and porting those to MINGW
takes a considerable effort...
\$\endgroup\$
std::thread
.
\$\endgroup\$
Commented
Jun 26, 2016 at 14:30
I wouldn't waste your time on trying to get it going in cygwin. You would probably actually HAVE to move to mingw to get it to work.
And even if you did get it working there's many issues with cygwin.
If you want to do game development that's definitely not the way to go unfortunately. I have tried before and it was a big headache.
If you just want to run some stuff other people made, it probably still won't work. And if it does it will be with a ton of effort.
Not good news, but that is just the reality.