dear fltk programers:

  I copy arc.cxx in test directory to fltk-1.1.10 directory
then compile it by g++ under ubuntu linux
-------
r...@eric-laptop:/home/eric/Dfltk/fltk-1.1.10#  ls
ANNOUNCEMENT      config.log        fltk-config.in  lib             test
arc.cxx           config.status     fltk.list       Makefile        vc2005
borlandc          configure         fltk.list.in    makefiles       vcnet
ch12try1.cpp      configure.in      fltk.spec       makeinclude     visualc
CHANGES           COPYING           fltk.spec.in    makeinclude.in  watcom
CMake             CREDITS           fltk.xpm        png             watcom.mif
CMakeLists.txt    DartConfig.cmake  fluid           README          zlib
config.h          documentation     forms.h         README.mac
configh.cmake.in  FL                install-sh      README.win32
configh.in        fltk-config       jpeg            src
r...@eric-laptop:/home/eric/Dfltk/fltk-1.1.10# g++ arc.cxx
arc.cxx:28:19: error: FL/Fl.H: No such file or directory
arc.cxx:29:33: error: FL/Fl_Double_Window.H: No such file or directory
arc.cxx:30:36: error: FL/Fl_Hor_Value_Slider.H: No such file or directory
arc.cxx:31:24: error: FL/fl_draw.H: No such file or directory
arc.cxx:36: error: expected class-name before ‘{’ token
arc.cxx: In member function ‘void Drawing::draw()’:
arc.cxx:38: error: ‘x’ was not declared in this scope
arc.cxx:38: error: ‘y’ was not declared in this scope
arc.cxx:38: error: ‘w’ was not declared in this scope
arc.cxx:38: error: ‘h’ was not declared in this scope
arc.cxx:38: error: ‘fl_clip’ was not declared in this scope
arc.cxx:39: error: ‘FL_DARK3’ was not declared in this scope
arc.cxx:39: error: ‘fl_color’ was not declared in this scope
arc.cxx:40: error: ‘fl_rectf’ was not declared in this scope
arc.cxx:41: error: ‘fl_push_matrix’ was not declared in this scope
arc.cxx:43: error: ‘fl_translate’ was not declared in this scope
arc.cxx:44: error: ‘fl_rotate’ was not declared in this scope
arc.cxx:47: error: ‘FL_WHITE’ was not declared in this scope
arc.cxx:48: error: ‘fl_translate’ was not declared in this scope
arc.cxx:49: error: ‘fl_begin_complex_polygon’ was not declared in this scope
arc.cxx:50: error: ‘fl_arc’ was not declared in this scope
arc.cxx:51: error: ‘fl_gap’ was not declared in this scope
arc.cxx:53: error: ‘fl_end_complex_polygon’ was not declared in this scope
arc.cxx:54: error: ‘FL_RED’ was not declared in this scope
arc.cxx:55: error: ‘fl_begin_line’ was not declared in this scope
arc.cxx:57: error: ‘fl_end_line’ was not declared in this scope
arc.cxx:58: error: ‘fl_pop_matrix’ was not declared in this scope
arc.cxx:59: error: ‘fl_pop_clip’ was not declared in this scope
arc.cxx: In constructor ‘Drawing::Drawing(int, int, int, int)’:
arc.cxx:62: error: class ‘Drawing’ does not have any field named 
‘Fl_Widget’
arc.cxx: At global scope:
arc.cxx:67: error: variable or field ‘slider_cb’ declared void
arc.cxx:67: error: ‘Fl_Widget’ was not declared in this scope
arc.cxx:67: error: ‘o’ was not declared in this scope
arc.cxx:67: error: expected primary-expression before ‘void’
arc.cxx: In function ‘int main(int, char**)’:
arc.cxx:74: error: ‘Fl_Double_Window’ was not declared in this scope
arc.cxx:74: error: expected ‘;’ before ‘window’
arc.cxx:80: error: ‘Fl_Slider’ was not declared in this scope
arc.cxx:80: error: ‘s’ was not declared in this scope
arc.cxx:80: error: expected type-specifier before ‘Fl_Hor_Value_Slider’
arc.cxx:80: error: expected ‘;’ before ‘Fl_Hor_Value_Slider’
arc.cxx:86: error: ‘FL_ALIGN_LEFT’ was not declared in this scope
arc.cxx:87: error: ‘slider_cb’ was not declared in this scope
arc.cxx:90: error: ‘window’ was not declared in this scope
arc.cxx:92: error: ‘Fl’ has not been declared
r...@eric-laptop:/home/eric/Dfltk/fltk-1.1.10#
-----------------------------------------------------------
also did anyone know
graphic
lib (fltk) requested in Mr. Bjarne Stroustrup book-"programming--principle and 
practice
using c++" 4th ed, '09.  I tried to copy and run first example program
in your ch12 Display model.  but my compiler g++ return a lot of error
first of all where are the include files, Simple_window.h and Graph.h?

---------
r...@eric-laptop:/home/eric/Dfltk/fltk-1.1.10# g++ ch12try1.cpp
ch12try1.cpp:1:27: error: Simple_window.h: No such file or directory
ch12try1.cpp:2:19: error: Graph.h: No such file or directory
ch12try1.cpp: In function ‘int main()’:
ch12try1.cpp:7: error: ‘Graph_lib’ is not a namespace-name
ch12try1.cpp:7: error: expected namespace-name before ‘;’ token
ch12try1.cpp:8: error: ‘Point’ was not declared in this scope
ch12try1.cpp:8: error: expected ‘;’ before ‘tl’
ch12try1.cpp:10: error: ‘Simple_window’ was not declared in this scope
ch12try1.cpp:10: error: expected ‘;’ before ‘win’
ch12try1.cpp:11: error: ‘Polygon’ was not declared in this scope
ch12try1.cpp:11: error: expected ‘;’ before ‘poly’
ch12try1.cpp:12: error: ‘poly’ was not declared in this scope
ch12try1.cpp:15: error: ‘Color’ has not been declared
ch12try1.cpp:17: error: ‘win’ was not declared in this scope
-------
r...@eric-laptop:/home/eric/Dfltk/fltk-1.1.10# cat ch12try1.cpp
#include "Simple_window.h"
#include "Graph.h"
// get access to our window library
// get access to our graphics library facilities
int main()
{
using namespace Graph_lib; // our graphics facilities are in Graph_lib
Point tl(100,100);
// to become top left corner of window
Simple_window win(tl,600,400,"Canvas"); // make a simple window
Polygon poly; // make a shape (a polygon)
poly.add(Point(300,200)); // add a point
poly.add(Point(350,100)); // add another point
poly.add(Point(400,200)); // add a third point
poly.set_color(Color::red);
// adjust properties of poly
win.attach (poly); // connect poly to the window
win.wait_for_button(); // give control to the display engine
}

------------------------------------------------------
plz help, Eric, [email protected]

_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk

Reply via email to