I also had trouble building FLTK 1.3.4-1 from source using CMake, evidenced by the fact that my lib folder in the FLTK directory is empty save for the README file, but right now the main point is what the title says. I got the headers and their accompanying .cpp files from the book's support site, but I couldn't compile the code at all because there a whole bunch of errors. Though maybe the main reason is that I'm using Visuals Studio 2017. I don't have VS2015 anymore since I uninstalled it after installing VS2017. I wonder if that was a dumb move on my part, since I can't find a link on Microsoft's site to download VS2015 anymore.
If someone can give me FLTK binaries for Windows that can work under VS2017, that'd be appreciated.
For now, I'll post my main file here to go with the attached file which is a text file with the errors and warnings on it. I'll also attach the headers and other files later if anyone asks.
I tried to compile it under VS' Clang/C2 compiler. So the error and warning messages are the same as Clang's. I also added the compiler flag "-std=c++14".
// Osman Zakir
// 3 / 18 / 2017
// Bjarne Stroustrup: Programming: Principles and Practice Using C++ 2nd Edition
// Chapter 12 Section 12.3 First GUI Example
// 12_3_first_gui_example.cpp
#include "../../Simple_window.h"
#include "../../Graph.h"
int main()
{
using namespace Graph_lib;
Point tl{ 100, 100 };
Simple_window win{ tl, 600, 400, "Canvas" };
Graph_lib::Polygon poly;
poly.add(Point{ 300, 200 });
poly.add(Point{ 350, 100 });
poly.add(Point{ 400, 200 });
poly.set_color(Color::red);
win.attach(poly);
win.wait_for_button();
}