Fltk trial (1)

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.