From e07da88179cf18b98fd68a5b6515955d87729b6b Mon Sep 17 00:00:00 2001
From: Michael R Sweet This chapter teaches you the basics of compiling programs
that use FLTK.2 - FLTK Basics
+2 - FLTK Basics
-Fl_Window *window = new Fl_Window(300,180); +Fl_Window *window = new Fl_Window(300,180);
and a box with the "Hello, World!" string in it:
-Fl_Box *box = new Fl_Box(20,40,260,100,"Hello, World!"); +Fl_Box *box = new Fl_Box(20,40,260,100,"Hello, World!");
Next, we set the type of box and the size, font, and style of the label:
@@ -216,13 +216,22 @@ CC ... -L/usr/local/lib -lfltk -lXext -lX11 -lm gcc ... -L/usr/local/lib -lfltk -lXext -lX11 -lm -The fltk-config script included with FLTK can be +
As before, the fltk-config script included with FLTK can be used to get the options that are required by your linker:
CC ... `fltk-config --ldflags`+
Finally, you can use the fltk-config script to +compile a single source file as a FLTK program: + +
+fltk-config --compile filename.cpp ++ +
This will create an executable named filename. +
In Visual C++ you will need to tell the compiler where to -- cgit v1.2.3