View previous topic :: View next topic |
Author |
Message |
Dr.Disrespect Grandmaster Cheater Reputation: 3
Joined: 17 Feb 2016 Posts: 526
|
Posted: Fri Mar 31, 2017 10:49 pm Post subject: C++, GUI Library and FLTK. |
|
|
In Chapter 12 of Stroustrup's book "Programming Principles and Practice Using C++", there is a code example like this:
Code: |
#include "Simple_window.h“
#include "Graph.h"
int main()
{
using namespace Graph_lib; //our graphics facilities are in Graph_lib
Point t1(100,100); //to become top left corner of window
Simple_window win(t1,600,400"Canvas"); //make a simple window
Polygon poly;
poly.add(Point(300,200)); //add point
poly.add(Point(350,100)); //another point
Poly.add(Point(400,200)); //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
}
|
However, after I installed FLTK in VS 2015, I couldn't find the related headers to include.
So, what header files do I need to include to get the same result as using Stroustrup's code?
Thanks.
_________________
**************
A simple example is better then ten links. |
|
Back to top |
|
|
ulysse31 Master Cheater Reputation: 2
Joined: 19 Mar 2015 Posts: 324 Location: Paris
|
Posted: Sat Apr 01, 2017 12:37 pm Post subject: |
|
|
Chances are you need to include FLTK's include directory in your msvc 2015 solution project property as "additional include directories".
I have not worked with FLTK itself but I have had to include many libraries.
your compiling error message might help in giving you a more accurate answer
|
|
Back to top |
|
|
deleted19776 I post too much Reputation: 11
Joined: 29 Apr 2007 Posts: 3838
|
Posted: Mon Apr 03, 2017 10:13 pm Post subject: |
|
|
Try googling those header files as well as not using C++ for learning graphics like this.
|
|
Back to top |
|
|
Dr.Disrespect Grandmaster Cheater Reputation: 3
Joined: 17 Feb 2016 Posts: 526
|
Posted: Tue Apr 04, 2017 3:34 pm Post subject: |
|
|
Thanks for the advice, ulysse31.
_________________
**************
A simple example is better then ten links. |
|
Back to top |
|
|
|