FLTK/Compilation

From Wikibooks, open books for an open world
< FLTK
Jump to: navigation, search

Information[edit]

The fltk2-config command gives useful information.

Usage: fltk2-config [OPTIONS]
Options:
        [--prefix[=DIR]]  return/set where FLTK is installed
        [--exec-prefix[=DIR]]
        [--version]
        [--api-version]

Options telling what we are doing:
        [--use-gl]        use GL
        [--use-images]    use extra image formats (PNG, JPEG)
        [--use-glut]      use glut compatibility layer
        [--use-forms]     use forms compatibility layer

Options telling what information we request:
        [--cflags]        return flags to compile C using FLTK
        [--cxxflags]      return flags to compile C++ using FLTK
        [--ldflags]       return flags to link against FLTK
        [--ldstaticflags] return flags to link against static FLTK library
                                          even if there are DSOs installed
        [--libs]          return FLTK libraries full path for dependencies
        [--cxx]           return name of C++ compiler used to build FLTK
        [--cc]            return name of C compiler used to build FLTK

Option to compile and link an application:
        [-g]              compile the program with debugging information
        [--compile program.cxx]
        [--post program]

For instance, the --cxxflags and --ldflags options give the flags required to compile and link your application.

Static linking[edit]