thanks your reply, so I follow your advice to download and install 2.0.x-r7725 
and try to compile again that simplest display model in that 
book(chapter.12.7.2.cpp), but again Window is ambiguous, that mean polymorphism 
on gcc/g++ seem did not do good.  So I check the code, on
GUI.cpp, own be assing address of variable of Window, but I can not trace 
where/how it be used.

my compile result
--------
e...@eric-laptop:~/BStrou/usingC++4/code/Chapter12$ 
/home/eric/Dfltk/fltk-2.0.x-r7725/fltk2-config --compile chapter.12.7.2.cpp
gcc -I/home/eric/Dfltk/fltk-2.0.x-r7725 
-I/home/eric/Dfltk/fltk-2.0.x-r7725/images/png 
-I/home/eric/Dfltk/fltk-2.0.x-r7725/images/jpeg -I/usr/include/freetype2 
-Wno-non-virtual-dtor -o chapter.12.7.2 chapter.12.7.2.cpp 
-L/home/eric/Dfltk/fltk-2.0.x-r7725/lib 
/home/eric/Dfltk/fltk-2.0.x-r7725/lib/libfltk2.a -lX11 -lXi -lXinerama -lXft 
-lpthread -lm -lXext -lsupc++
In file included from /usr/include/c++/4.4/ext/hash_map:60,
                 from std_lib_facilities.h:34,
                 from Graph.h:13,
                 from GUI.h:11,
                 from Simple_window.h:10,
                 from chapter.12.7.2.cpp:7:
/usr/include/c++/4.4/backward/backward_warning.h:28:2: warning: #warning This 
file includes at least one deprecated or antiquated header which may be removed 
without further notice at a future date. Please use a non-deprecated interface 
with equivalent functionality instead. For a listing of replacement headers and 
interfaces, consult the file backward_warning.h. To disable this warning use 
-Wno-deprecated.
In file included from chapter.12.7.2.cpp:7:
Simple_window.h:17: error: reference to ‘Window’ is ambiguous
/usr/include/X11/X.h:96: error: candidates are: typedef XID Window
Window.h:26: error:                 class Graph_lib::Window
Simple_window.h:17: error: reference to ‘Window’ is ambiguous
/usr/include/X11/X.h:96: error: candidates are: typedef XID Window
Window.h:26: error:                 class Graph_lib::Window
e...@eric-laptop:~/BStrou/usingC++4/code/Chapter12$
---------------------
plz help again, eric, [email protected]
---------------------------------------









> >   after i install every package and ready to go(compile) some
> > simple fltk program from Mr. Stroustrup "Programming-Principle and
> > practice using C++" 4th ed., chapter 12's first example program
> > (chapter.12.3.cpp copied from his website,
> > http://www.stroustrup.com/Programming/
> > )
> > I get a lot compile errors, which is really out of novice as me to
> > figure out.
> > -------------------------------------------------------------
> >
> > # /home/eric/Dfltk/fltk-1.1.10/fltk-config --compile  chapter.12.3.cpp
> >     g++ -I/home/eric/Dfltk/fltk-1.1.10 \
> >     -I/home/eric/Dfltk/fltk-1.1.10/png \
> >     -I/home/eric/Dfltk/fltk-1.1.10/jpeg \
> >     -o chapter.12.3 chapter.12.3.cpp \
> >     /home/eric/Dfltk/fltk-1.1.10/lib/libfltk.a -ldl -lm -lXext -lX11
> > In file included from /usr/include/c++/4.4/ext/hash_map:60,
> >                  from std_lib_facilities.h:34,
> >                  from Graph.h:13,
> >                  from GUI.h:11,
> >                  from Simple_window.h:10,
> >                  from chapter.12.3.cpp:7:
>
> If I remember correctly, Stroustrup's book is based on FLTK-2 and it
> appears that you are trying to run his examples using FLTK-1.1.10.
>
> You will need to download the latest FLTK-2.0 snapshot using the
> link under the Quick Info area at the top left of the FLTK home page.
> The current snapshot is for FLTK-2.0.x-r7725.
>
> For more info, see http://www.fltk.org/articles.php?L825
> Article #825: What are the versions of FLTK?
>
> D.

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

Reply via email to