Thread: libraries in Bjarne Stroustrup's book wont work

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Registered User
    Join Date
    Aug 2005
    Posts
    44

    libraries in Bjarne Stroustrup's book wont work

    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
    Last edited by shintaro; 07-30-2011 at 01:17 PM.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 5
    Last Post: 09-05-2005, 06:26 AM
  2. calculator program from Bjarne Stroustrup's book
    By deduct in forum C++ Programming
    Replies: 4
    Last Post: 03-21-2003, 01:43 AM
  3. Bjarne Stroustrup The c++ Programming Language (3rd ed)
    By smirnoff in forum C++ Programming
    Replies: 3
    Last Post: 11-24-2002, 04:52 PM
  4. Bjarne Stroustrup
    By mithrandir in forum A Brief History of Cprogramming.com
    Replies: 8
    Last Post: 08-11-2001, 06:41 PM