Skip to content

Build for Windows with MXE

Jakob Flierl edited this page Jul 2, 2023 · 5 revisions

Cross-compile bpp using MXE as follows:

cd /opt
git clone https://github.com/mxe/mxe.git
cd mxe
export PATH=`pwd`/usr/bin/:$PATH
nice make MXE_TARGETS='x86_64-w64-mingw32.shared' qt5  QT5_BUILD_TYPE=-debug-and-release lua assimp freeglut glew sdl2

Download and build libQGLViewer:

git clone https://github.com/GillesDebunne/libQGLViewer
cd libQGLViewer/QGLViewer
/opt/mxe/usr/x86_64-w64-mingw32.shared/qt5/bin/qmake
make

Download and build luabind:

apt-get source luabind # luabind-0.9.1+git20150823+dfsg
x86_64-w64-mingw32.shared-cmake . -DBUILD_SHARED_LIBS:BOOL=ON -Wno-dev . -G "Unix Makefiles"
make
make install

bullet3, see: https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=31552#p31552 :

x86_64-w64-mingw32.shared-cmake . -DINSTALL_LIBS=ON -DBUILD_CPU_DEMOS=OFF -DBUILD_DEMOS=OFF -DBUILD_EXTRAS=OFF -DBUILD_MULTITHREADING=OFF -DBUILD_UNIT_TESTS=OFF -DUSE_CUSTOM_VECOR_MATH=OFF -DUSE_DOUBLE_PRECISION=OFF -DUSE_GLUT=OFF -DUSE_GRAPHICAL_BENCHMARK=OFFH
make
make install

Clone, build bpp (WIP):

/opt/mxe/usr/x86_64-w64-mingw32.shared/qt5/bin/qmake CONFIG+=debug
make

For more details, see: https://github.com/bullet-physics-playground/bpp/actions/workflows/mxe.yml