Im reading Bjarne Stroustrup's book "Programming Principals and Practices Using C++" and I cant get the graphics libraries he provides to compile. These libraries are a wrapper that interfaces with the FLTK widgets toolkit. I have FLTK set up and it compiles fine in my IDE. Here is the download page for Bjarne's source files:
http://www.stroustrup.com/Programming/Graphics/
if I could trouble someone to install FLTK and then download these files and run make on them I would really appreciate it. Just remember this is not my code, you are fixing Bjarne Stroustrup's code. I will update my Amazon review of this book with anything I learn about how to set up these libraries properly.
one minor note, the std_lib_facilities.h file has to be one directory above the rest of the files
here is the error message I get when I run make
Code:
In file included from Graph.cpp:8:
Graph.h:140: error: ISO C++ forbids declaration of ‘Vector’ with no type
Graph.h:140: error: expected ‘,’ or ‘...’ before ‘&’ token
Graph.h:141: error: ISO C++ forbids declaration of ‘Vector’ with no type
Graph.h:141: error: expected ‘,’ or ‘...’ before ‘&’ token
Graph.cpp:235: error: redefinition of ‘Graph_lib::Circle::Circle(Point, int)’
Graph.h:285: error: ‘Graph_lib::Circle::Circle(Point, int)’ previously defined here
Graph.cpp:243: error: redefinition of ‘Point Graph_lib::Circle::center() const’
Graph.h:290: error: ‘Point Graph_lib::Circle::center() const’ previously defined here
Graph.cpp: In function ‘Graph_lib::Suffix::Encoding Graph_lib::get_encoding(const String&)’:
Graph.cpp:410: error: ‘strlen’ was not declared in this scope
# cc1plus 0.30 0.04
make: *** [Graph.o] Error 1