Skip to content

Cross Compilation of FLTK

Albrecht Schlosser edited this page May 13, 2019 · 2 revisions

Cross-Compilation of FLTK

There are several ways to cross-compile the FLTK library

  • configure/make
  • CMake

Cross-Compilation with 'configure/make'

E.g. cross-compilation for Windows under Linux (Ubuntu)

$ LDFLAGS='-static-libstdc++ -static-libgcc' ./configure --host=x86_64-w64-mingw32 --prefix=/usr/share/mingw-w64

The definition of LDFLAGS is necessary to build stand-alone (native) Windows executables.

'--host=x86_64-w64-mingw32' enables cross compilation with the installed MinGW-w64 tools.

'--prefix=/usr/share/mingw-w64' is only necessary to install the cross-compiled FLTK libraries and headers in the cross-compilation environment. This is untested, I did not install the cross-compiled libs.

$ make

Cross-Compilation with 'CMake'

You need a toolchain file ... (to be continued)