This does not work yet. Maybe someone can use it as a starting point.
For a guide on how to compile your application using a precompiled OGRE SDK see Cross Compiling in Linux.
First, install the MinGW package:
apt-get install mingw32
Now you have two options for obtaining the dependency libraries: either get pre-built ones from the homepage, or build them from source.
Useful information can be found on this page: Build OGRE dependencies using MSYS.
First, get dependency library sources:
For each library, run:
./configure --prefix=/usr/i586-mingw32msvc/ --host=i586-mingw32msvc make make install (as root)
Because of non-standard configure scripts this does not work for jpeg and reportedly not for zlib, so let's try FreeImage instead:
- Download and extract FreeImage
- Edit Makefile.cygwin
CC = gcc CXX = g++ AR = ar INSTALLDIR = /usr
CC = i586-mingw32msvc-gcc CXX = i586-mingw32msvc-g++ AR = i586-mingw32msvc-ar INSTALLDIR = /usr/i586-mingw32msvc
- Now run
make -f Makefile.cygwin
- This results in several errors similar to this:
Source/FreeImage.h:221: error: conflicting declaration â€˜typedef int* PBITMAPINFOâ€™ /usr/lib/gcc/i586-mingw32msvc/4.2.1-sjlj/../../../../i586-mingw32msvc/include/wingdi.h:1392: error: â€˜PBITMAPINFOâ€™ has a previous declaration as â€˜typedef struct tagBITMAPINFO* PBITMAPINFOâ€™
- Visit this page and download "Code::Blocks + MingW C++ Toolkit Precompiled Dependencies 1.4.x"
- Move everything from "Dependencies/include" to "/usr/i586-mingw32msvc/include/"
- Move everything from "Dependencies/lib/Release/" to "/usr/i586-mingw32msvc/lib"
- Rename libFreeImage.a to libfreeimage.a
- Move everything from "Samples/Common/bin/Release" to "/usr/i586-mingw32msvc/lib"
- rename cg.dll to Cg.dll
Configure fails here because FreeImage_Load cannot be found in libfreeimage.a.
Get the OGRE sources and run
prefix=/usr/i586-mingw32msvc/ host=i586-mingw32msvc --with-platform=Win32