how_to_build_for_mingw.txt 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. Download FreeType. Get the Binaries package:
  2. http://gnuwin32.sourceforge.net/packages/freetype.htm
  3. Direct link:
  4. http://gnuwin32.sourceforge.net/downlinks/freetype-bin-zip.php
  5. Extract to Dependencies\freetype
  6. Go into the Build folder and run cmake. However, notice:
  7. ** REPLACE C:\MinGW\bin\mingw32-make.exe with the path to your MinGW make.exe file.
  8. ** You have to have the C:\MinGW\bin in the path (or cmake will complain for missing libgmp-10.dll, etc).
  9. ** You must not have msys/bin in the path, it doesn't work with cmake
  10. ** Use -DSTATIC_LIB if static libs are wanted. However, you will also need -DSTATIC_LIB to your own application when including Rocket files.
  11. ** Notice that the generator "MinGW Makefiles" match the mingw32-make.exe, while the generator "msys Makefiles" match the msys/bin/make.exe. The first combination is used for
  12. compiling from the DOS prompt, and the second one for compiling from a MinGW shell.
  13. cmake -G "MinGW Makefiles" -D CMAKE_MAKE_PROGRAM="c:\MinGW\bin\mingw32-make.exe" -D FREETYPE_INCLUDE_DIRS="..\Dependencies\freetype\include;..\Dependencies\freetype\include
  14. \freetype2" -D FREETYPE_LIBRARY="..\Dependencies\freetype\lib\libfreetype.dll.a" .
  15. Once cmake completes successfully, run make
  16. make
  17. The project will compile and three libraries will be generated in the Build folder, use them to link with your project.
  18. libRocket.dll.a
  19. libRocketControls.dll.a
  20. libRocketDebugger.dll.a
  21. The corresponding dll files are also created, and need to be available when running your application (if not linked statically):
  22. libRocket.a
  23. libRocketControls.a
  24. libRocketDebugger.a
  25. From Dependencies/freetype/bin, get the file:
  26. freetype6.dll
  27. If you get the cryptic error message "Can't correctly start the application (0xc000007b)", then zlib1.dll is also needed (from elsewhere).
  28. Done!