Install the basic library first. You can use aptget to automatically install dependencies.
Sudo apt-Get install libfltk1.1-dev libfltk1.1
Download the latestSource code, Compile
TAr avzf fltkxxx
CD fltkxxx
./Configure
Make
Sudo make install
cutepig @ Ubuntu :~ /Downloads/fltk-1.3.0 $ sudo make install
== installing FL ===< br> installing include files in/usr/local/include...
== installing JPEG ==< br> installing .. /lib/libfltk_jpeg.a in/usr/local/lib...
installing JPEG headers in/usr/local/include/FL/images...
== installing zlib ===< br> installing libfltk_z.a in/usr/local/lib...
installing zlib headers in/usr/local/include/FL/images...
== installing PNG ===< br> installing libfltk_png.a in/usr/local/lib...
installing PNG headers in/usr/local/include/FL/images...
== installing SRC ===< br> installing libraries in/usr/local/lib...
== installing fluid ===< br> installing fluid in/usr/local/bin...
== installing test ===< br> installing example programs to/usr/local/share/doc/fltk/examples...
= installing Documen Tation ===< br> installing documentation files in/usr/local/share/doc/fltk...
installing man pages in/usr/local/share/man...
cutepig @ Ubuntu :~ /Downloads/fltk-1.3.0 $
Write an exampleProgram
# Include <FL/FL. h>
# Include <FL/fl_1_1_h>
# Include <FL/fl_button.h>
Int main (INT argc, char * argv []) {
Fl_window * w = new fl_window (330,190 );
New fl_button (110,130,100, 35, "okay ");
W-> end ();
W-> show (argc, argv );
Return FL: Run ();
}
Compile and run
G ++ test. cpp-lfltk-lx11-LM
Reference URL
Download SourceCode
Http://www.fltk.org/
Getting started
Http://www.fltk.org/documentation.php/doc-1.1/basics.html#basics