FLTK library and Visual Studio 2017

I recently upgraded from Visual Studio 2015 to 2017, and I'm also just starting on Chapter 12 in PPP2. I wanted to know how to find the prebuilt binaries for FLTK. If I can't find the ones for the latest stable release, then I need to know how to build them from source with VS2017. VS2017 apparently has CMake, so I need to know how to use that better (I have trouble using it whenever I try to use it).
You can get FLTK through the NuGet package manager: Project=>Manage NuGet packages.
It should come with a Visual Studio Solution you can build.
Oh, nice, it's actually possible. Thanks for the info. I was wondering if it's possible and was going to check if it is. This saves me the trouble (assuming it's there in VS2017, too).

One other thing, though. I tried this code:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#include "../../Simple_window.h" // get access to our window library
#include "../../Graph.h" // 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
}


It's the code from Section 12.3 in the book. The compiler keeps saying it can't find the headers, even though I have them in the folder two levels up and am doing the "../../header-.h" include thing. I even added the headers and their source files to the Project tree. Why is this still happening?

Edit: I got Simple_window.h worked out, but there are other problems still. Could you please help me get this compiled correctly?
Last edited on
Topic archived. No new replies allowed.