README.mingw_cross 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. Cross-compilation from GNU/Linux (static and shared DLL)
  2. ========================================================
  3. Install MinGW, and specify which MinGW you're using:
  4. - on Debian/Ubuntu, mingw-w64, 64-bit executables:
  5. apt-get install mingw-w64
  6. GNU_HOST=x86_64-w64-mingw32
  7. - on Debian/Ubuntu, mingw-w64, 32-bit executables:
  8. apt-get install mingw-w64
  9. GNU_HOST=i686-w64-mingw32
  10. - on Fedora, mingw32, 32-bit executables:
  11. yum install mingw32-gcc
  12. GNU_HOST=i686-pc-mingw32
  13. - on Debian/Ubuntu, mingw32 (deprecated):
  14. apt-get install mingw32
  15. GNU_HOST=i586-mingw32msvc
  16. With CMake
  17. ----------
  18. Cross-compile with:
  19. mkdir cross-woe/ && cd cross-woe/
  20. cmake \
  21. -D GNU_HOST=$GNU_HOST \
  22. -D CMAKE_TOOLCHAIN_FILE=mingw_cross_toolchain.cmake \
  23. -D CMAKE_INSTALL_PREFIX=/freeglut \
  24. ..
  25. make -j4
  26. make install DESTDIR=$(pwd)
  27. Everything is now in the new 'freeglut/' directory.
  28. The .dll is in 'freeglut/lib/'.
  29. Compiling your code
  30. -------------------
  31. Compilation of your own programs is done as usual.
  32. See README.cygwin_mingw for details.