How to install and use fltk-1.3.4 in Visual Studio 2017 [complete guide]

Last successfully tested: 30.11.2017

Chapter 12 to 16 of Bjarne Stroustrup’s – “Programming Principles and Practice Using C++” uses a GUI library called FLTK (Fast Light Tool Kit, “full tick”). This guide demonstrates how to download, compile from source, build and use the fltk version 1.3.4 with Visual Studio 2017 Community.
As it was quiet frustrating getting everything to run, I thought I would take the extra time to make it extra detailed, I hope it is not confusing or over complicating things for who ever is struggling with this.

(NOTE: Before you start, even though the following path will get you to compile and run fltk projects, and it is the Bjarne Stroustrup’s Programming Principles and Practice way, the fltk.org team recommended to do it like this guide shows. It is to prevent cross contamination and keep your Visual Studio 2017 environment clean and tidy. The original discussion can be found here. I just left this guide on my page in case people persist on doing it the Bjarne Stroustrup way.)

Step 1: Downloading fltk-1.3.4.

Go to: http://www.fltk.org/index.php
Go to the download tab and click on fltk-1.3.4-1-source.tar.gz

The fltk-1.3.4-1-source.tar.gz should be automatically downloaded.

I used winRar to extract fltk-1.3.4-1-source.tar.gz to my documents folder.

Step 2: Compiling and building fltk-1.3.4 from source.

Go to your extracted fltk-1.3.4 folder. In my case C:\Users\Philipp\Documents\dev\fltk-1.3.4-1-source\fltk-1.3.4-1\ide\VisualC2010

Open (double-click) fltk.sln.

Visual Studio 2017 Community will open, and ask you if you want to update the files.

Click OK and wait for a few moments.
Your window will look like this:

Right-click the demo solution file.
Click on Set as StartUp Project.

Now click on Build and Build Solution.

After a couple of moments your Output window shows Build: 79 succeeded…

Make sure to set Debug mode.

Press F5 on your keyboard. Or the playbutton on top of your canvas Local Windows Debugger.

So far so good. You should get two windows, one console window and another one showing the fltk-test layout.

Now change the Debug mode to Release mode on the top left corner of your Visual Studio window.

Again: Press F5 on your keyboard. Or the playbutton on top of your canvas Local Windows Debugger to run your project.
You should now see the fltk-test layout and no console window.

Good job. Done compiling and test-running.

Step 3: Integrating fltk-1.3.4 files into your Visual Stuido 2017 Community folder structure.
Now you need to copy those freshly compiled files (explained in three steps in the next paragraph) into your Visual Studio 2017 Community folder structure so it knows where to find them:

1. Go to: your fltk-1.3.4-1 folder (in my case: C:\Users\Philipp\Documents\dev\fltk-1.3.4-1-source\fltk-1.3.4-1) and copy the Fl folder into your include folder (in my case): C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.10.25017\include

2. Go to: the lib folder in your fltk source folder (in my case C:\Users\Philipp\Documents\dev\fltk-1.3.4-1-source\fltk-1.3.4-1\lib) and copy all 14 .lib files (Note that there are pairs of 2, one of them named with a “d” for debug in the end). And paste them into your Visual Studio 2017 lib folder (in my case: C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.10.25017\lib\x64). Of course you noticed that in the lib folder there are two more folders: x64 and x86. I just pasted the 14 .lib files into both of them (In case there is someone out there who can tell me if that is wrong or right, please contact me).

fltk-1.3.4-1\lib to VC\Tools\MSVC\14.10.25017\lib\x64

fltk-1.3.4-1\lib to VC\Tools\MSVC\14.10.25017\lib\x86

3. Go to: the fluid folder in your fltk source folder (in my case: C:\Users\Philipp\Documents\dev\fltk-1.3.4-1-source\fltk-1.3.4-1\fluid) and copy fluid.exe and fluidd.exe into your Visual Studio 2017 bin folder (in my case: C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.10.25017\bin).

Excellent, that’s all done. Now lets setup a new project and see if Visual Studio 2017 Community is able to locate and use the files we just copied over.
Let’s open Visual Studio 2017 Community (or any other of course) and under the Visual C++ – Windows Desktop tab create a new Windows Desktop Wizard project.

Tick the box Empty project (very important).

I called it fltk_test.

In your newly created Empty Project right click the Source Files folder and Add a New Item which is going to be a .cpp file.
I called it fltk_test.cpp.

Copy the following code into your .cpp file:

#include<FL/Fl.h>
#include<FL/Fl_Box.h>
#include<FL/Fl_Window.h>

int main()
{
	Fl_Window window(200, 200, "Window title");
	Fl_Box box(0, 0, 200, 200, "Hey, I mean, Hello, World!");
	window.show();
	return Fl::run();
}

(NOTE: The following Properties setup needs to be done for every new fltk project you are creating! I will tell you later to come back to this point.)
Then go to your top navigation bar and click Project and in the drop-down menu Properties.

Make sure to set the Configuration to Debug.

On your left hand side go to Linker.

And Input.

Click on the drop-down arrow in the Additional Dependencies tab.

And click on Edit.

A new window will pop up. In the screenshot shown I filled in already the following entries:

fltkd.lib
wsock32.lib
comctl32.lib
fltkjpegd.lib
fltkimagesd.lib

Please do the same.

Click OK to confirm your entry.

Now go to System.
And set the SubSystem to Console (/SUBSYSTEM:CONSOLE) with the help of the drop-down menu.

Click Apply and hit F5 to test-run the project.
If you have done everything I told you so far your project should compile and run and show something like this:

Great, now go back to your PropertiesProject and Properties.
And chose from the Configuration Release.

On the left hand side to Linker and then to Input, just like you did before.

Click on the drop-down arrow to show the Additional Dependencies menu and select Edit.

Copy paste the following entries into the empty field (I filled them out already, Note: Since this is the Release Category there is no d for debug in the .lib names):

fltk.lib
wsock32.lib
comctl32.lib
fltkjpeg.lib
fltkimages.lib

Click OK and go to Sysyem.

Set the SubSystem to Windows (/SUBSYSTEM:WINDOWS), which can be found in the drop-down menu and click OK.

Apply your changes and exit your Properties window with OK.
Now change the Solution Configurations to Release.

And run your project by pressing F5 on your keyboard, or the playbutton on the top of your canvas Local Windows Debugger.
If everything went well you should be able to look at something like this (application window with the fltk-interface and no console window, if this didn’t go as planned please go to the next step):

At this point maybe people experience an error message saying “… cannot open include file ‘x11/xlib.h’ no such file or directory …”. Here is how to fix this:
(If everything works for you just fine, please skip ahead!)

Double click the error message in your errors tab, the x.H file will open in Visual Studio 2017 Community as a new tab, if not go to your External Dependencies folder in your Solution Explorer within Visual Studio and look for the file manually and open it. As you may notice already, the errors will be underlined in curly red.

Now go to line 28, between # include “Enumerations.H” on line 27 and # ifdef WIN32 and include # define WIN32 like this:


# include “Enumerations.H”
# define WIN32
# ifdef WIN32

Safe the file and you should be good to go, now: Hit F5 to test-run the project and it should look like this:

If you got to this point: Congratulations, you made it!
For who ever was interested in just getting the fltk-1.3.4 GUI library running and applying it on a test project, this is the end of your journey and this guide. If you are working through Bjarne Stroustrup’s Programming Principles and Practice Using C++ and you are in Chapter 12 starting to use fltk keep on reading for instructions on how to use it within the “Stroustrup”-environment:

Step 4: Using fltk-1.3.4 with Bjarne Stroustrup’s header and .cpp files.
Safe your fltk test-project and create a new project. Under the Visual C++ – Windows Desktop tab create a new Windows Desktop Wizard project, just like you did before (I will go through this a bit faster as you should be familiar by now).

Tick the box Empty project (very important).

I called mine BS_PPP_Cpp_fltk.

Right-click the Source Files folder in your Solution Explorere and Add a New Item. Create a new .cpp file, I called mine p437_d_1_.cpp.

Copy and paste the following code from Bjarne Stroustrup’s Programming Principles and Practice Using C++, Drill 1 page 437:

#include "Graph.h"
#include "Simple_window.h"

int main()
{
	using namespace Graph_lib;

	Point tl(150, 150);
	Simple_window win(tl, 600, 400, "My window");
	win.wait_for_button();
}

Go to Project and Properties and setup your project in the exact same way we did with our fltk test-project above.

Now this time, we have to add a couple of header files from Bjarne Stroustrup, and also some additional .cpp files.
Let’s begin with the header files:
Most of the people reading, working through Programming Principles and Practice Using C++ included the std_lib_facilities.h already many times so for who ever does not know where to get it from, this is the link. Download it and copy it in your project folder (in my case: C:\Users\Philipp\Documents\Visual Studio 2017\Projects\BS_PPP Cpp_fltk\BS_PPP_Cpp_fltk\BS_PPP_Cpp_fltk).
As well as the following header files:

std_lib_facilities.h
fltk.h
Graph.h
GUI.h
Point.h
Simple_window.h
Window.h

and while your on it also download and copy the following .cpp files into your project directory (as mentioned above):

Graph.cpp
GUI.cpp
Window.cpp

Right-click the Header Files folder in your project’s solution explorer. Add an Existing Item.

Once you added all your header files the Header Files folder should look like this:

Now also add the .cpp files: Graph.cpp, GUI.cpp and Window.cpp to your Source Files folder. Your Source Files folder should look like this:

Your project directory folder and your Solution Explorer in Visual Studio 2017 should look like this:

Now you are almost there. We just have to make a couple of changes to those Added files.

Open the Point.h header file by double clicking it:

Remove all the notation double forward-slashes:

Open the GUI.cpp file by double clicking it:

Add Graph_lib:: in front of Window& of Button::attach (line 8)

In_box::attach (line 30) and Out_box::attach (line 49).

and remove or notate the constructor Menu::Menu as it is already defined in GUI.h.

Open the Graph.cpp file:

And go to line 313. Change return ff; to return bool(ff);

The last change you have to make is in Graph.h, open and #include “std_lib_facilities.h”:

This is it. Now safe all your files and run your project. I like to just hit F5.
If everything goes right and you were able to follow my instructions you should be able to see the following:

CONGRATULATION, ALL DONE!
If you made it so far and everything worked out I am very happy I could help you. At this point I should mention Benjamin Wuethrich. I followed his tutorial on installing and using fltk on Visual Studio 2015 and with the help of a bunch of other peoples forum posts and other informations I was able to transfer the knowledge to make it happen on Visual Studio 2017 Community. So thanks to Benjamin Wuethrich. His tutorial for Visual Studio 2015 can be found here.

Thank you for going through this with me, if you have any questions I am very happy to help. Also if you have any suggestions for improvement, please let me know.

53 thoughts on “How to install and use fltk-1.3.4 in Visual Studio 2017 [complete guide]

  1. Thank you for this guide, I couldn’t find any other guides better than this for me. But sadly I failed. I followed your steps and this error occured

    Severity Code Description Project Path File Line Suppression State
    Error C1083 Cannot open include file: ‘X11/Xlib.h’: No such file or directory fltk_test h:\prog\visual studio 2017\vc\tools\msvc\14.11.25503\include\fl h:\prog\visual studio 2017\vc\tools\msvc\14.11.25503\include\fl\x.h 37

    (just copied from Error List of visual studio)

    Can I get some solution about these?

    Like

    1. Hi Eric,
      I can try to help on this:
      The fl (“h:\prog\visual studio 2017\vc\tools\msvc\14.11.25503\include\fl”) folder in your include directory is capital letters “FL” and it needs to stay that way! I think that should solve all your problems.
      Let me know how it goes.

      Best, P

      PS: There is also a non-destructive-guide: https://bumpyroadtocode.com/2017/08/29/how-to-install-and-use-fltk-1-3-4-in-visual-studio-2017-complete-guide-2-0-no-cross-contamination/ The fltk.org team actually recommended to do it that way, I just kept the other guide (you have been using), because it is the Bjarne Stroustrup described way of installing fltk.

      Like

      1. Umm.. I’ve gone to that location but that folder name was “FL”. I guess Windows treats both “fl” and “FL” as same. So I couldn’t solve that problem. And additionaly I found that there is no file ‘X11/Xlib.h’ inside the “FL” folder.

        Like

  2. Thank you so much for these step-by-step instructions. I was able to rebuild FLTK under VS 2017 and then use the newly generated file with my FLTK project, which I had also upgraded from VS 2015 to 2017.

    Like

  3. Hey, I am using 1.3.4 with VS 2013. The 79 files compiled and the demo project ran successfully. However, I failed to integrate FLTK with VS 2013 for my project. I found there were only 7 files in ..\fltk-1.3.4-2\lib folder. Your example shows 14 files. Am I missing something?

    Like

    1. Hi Iloovatar, yes there must be something odd. In theory there should be 7 for release and 7 .lib files for debug. Note that I did my tutorial with fltk-1.3.4-1 instead of fltk-1.3.4-2, they must have released a new version which I have not reviewed yet. Either you download the fltk-1.3.4-1 and everything should be fine, or you hang tight till I get the chance to look at fltk-1.3.4-2… 🙂

      Like

  4. Phil, you saved my life. Thanks a lot. I’ve spent 7 days tearing my hair, trying to make this program to work before I find your site.

    Like

  5. Hi! I have installed FLTK library according to your instructions and tested it. All works great. I wrote code from PPP2 and changed all headers and .cpps as you did in your manual. I’ve defined WIN32 before all FLTK includes. But after run of application in debug mode read access violation exception was thrown.
    https://ibb.co/nRi7Nb
    In release mode it wasn’t. In release mode all works great and result is as depicted in Stroustrup’s book.
    Why?

    Like

    1. Hi vicgor, I am not entirely sure what the exact issues is, but I can have a guess: Did you specifically setup the lib files in your configurations for debug and release as I have described? There are two different types of lib files, fltk.lib, wsock32.lib, comctl32.lib, fltkjpeg.lib, fltkimages.lib for release and fltkd.lib, wsock32.lib, comctl32.lib, fltkjpegd.lib, fltkimagesd.lib for debug, notice the “d” (fltk[d].lib) in the file names.

      Like

      1. Ya, sure, I pointed certain .lib files for each configuration. “d”s for debug and without “d” for release. Now, all works without any problem, but I’m afraid that I’m going to have them in future.

        Like

  6. Yes, you was right. The problem was with my code, not with the library. For my regret I didn’t manage to identify a cause of error. What I did I deleted all headers of Stroustrup, downloaded the new ones and prepared them like you did. Program runs in both (release and debug) modes. It’s a pity that I could not find the error.

    Like

  7. Hi,

    I think your step-by-step explanation is very helpful. However, I rather have an issue that I am not sure how to solve/approach. Sorry if it is a stupid question but for two days I was not able to find the answer for it and I am still clueless.

    Basically, I downloaded fltk 1.3.4-1, Extracted the files and followed the rest of the instructions. In the process of VS building the solution, I get some sort of glitch. When it goes to the point to compile the fluid files, it freezes. No errors letting me know about an issue or anything, it is just forever compiling the fluid files. Here is some of the of Build Output:

    6>fluid.vcxproj -> C:\Users\Egeni\Documents\fltk-1.3.4-1\ide\VisualC2010\..\..\fluid\fluidd.exe
    68>—— Build started: Project: CubeView, Configuration: Debug Win32 ——
    69>—— Build started: Project: fast_slow, Configuration: Debug Win32 ——
    70>—— Build started: Project: inactive, Configuration: Debug Win32 ——
    71>—— Build started: Project: keyboard, Configuration: Debug Win32 ——
    71>Create .cxx and .h file with fluidd
    70>Create .cxx and .h file with fluidd
    68>Create .cxx and .h file with fluidd
    70>Compiling fluid files …
    71>Compiling fluid files …
    68>Compiling fluid files …
    69>Create .cxx and .h file with fluidd
    69>Compiling fluid files …

    Any help with this would be greatly appreciated.

    Thanks

    Like

    1. Hi ekolevblog, I’m not quiet sure what the solution to your problem is, but you might be victim of cross contamination. I recommend you to re-install Visual Studio and try this other guide, which ensures there is no cross contamination, the guide you have been using is as Bjarne Stroustrup describes in his book, but is actually not recommended by fltk.org, go here and try this way of installing fltk. Good luck!

      Like

      1. Hi bumpyroadtocode, apparently the first time I attempted to compile fltk something went wrong. The fluid.exe and fluidd.exe got stuck as processes requesting service in the background.As a result of this, from then on whether I reinstall VS or reboot my PC they would still wait in the background causing my compilation to glitch at compiling fluid files. Anyway, I figured my way around this and followed the rest of your guide. Everything works perfectly now.

        Awesome, thank you!

        Like

      2. Hi ekolevblog, I’m happy everything went well in the end, but could you take the time and write a quick comment on how you fixed it, just in case someone else would bump into the same issue! Thanks in advance!

        Like

      3. Hi bumpyroadtocode. The process of fixing the issue I had turned out to not be so complicated, just took time to figure it out…

        Basically, the fluid processes were running in the background, regardless of whether I would turn off and on my PC. To fix this I had to forcefully kill the processes. I did this in the Command Prompt using their PIDs (process ID).

        1. Open cmd.exe

        2. type the “tasklist” command in the Command Prompt

        I used “tasklist” to browse through all of the processes and see if there are any called “fluid” or “fluidd”. Once found on the list, I used their PID numbers to forcefully kill them.

        3. type “taskkill /PID 1234 /f” command in the Command Prompt

        “taskkill” this is the command to kill the process, “/PID” option allows you to use the task’s PID number (in the above case 1234), “/f” option kills the task forcefully.

        Hope this would help should anyone has a similar problem like mine.

        Thanks again.

        Liked by 1 person

  8. Hi,

    This is the best guide i found (and I was searching for a long time), but I still got a problem. When I compile code example from Bjarne’s book, there errors shows: https://imgur.com/a/zoFdZ

    Hope you will help me, cause I’m installing it already too long and I’m tired of it 😦
    Help me bumpyroadtocode, you’re my only hope

    Like

    1. Haha, that’s too funny. I was struggling with fltk for about two weeks 24/7, I don’t know why it is so hard. I had exactly the same problem as you did and I resolved the issue of the x.H problem in this guide, but as per your request also in the guide you did. Just refresh your page and have a look at my change. The change is in about the middle of the page, essentially you have to change some stuff in the x.H file. If you want to find the change in my post you can also search for the following text: “At this point maybe people experience an error message saying “… cannot open include file ‘x11/xlib.h’ no such file or directory …”.” I hope this helps, let me know how things go!

      Like

      1. No, I didn’t change anything, cause I can’t save it – I don’t have permissons to save that x.H file, so I can’t do anything

        Like

      2. I’m using Windows 10, and the x.H is in the D:\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.12.25827\include\FL
        I even edited it, by moving it into another folder, writing that line, and than moving it back. It worked, but not completely – now I got error “#error: is deprecated and will be REMOVED. Please use . You can define _SILENCE_STDEXT_HASH_DEPRECATION_WARNINGS to acknowledge that you have received this warning.” xD

        Like

      3. I highly recommend uninstalling Visual Studio 2017 and using my other guide here. It seems like it would be helpful to really be able to modifie fltk files without messing things up in the Visual Studio environment. (The guide I sent is more best practice and prevent cross-contamination)

        Like

  9. This is absolutely helpful, helping many many people to save hours and hours. Mr. Stroustrup should simply add the link to this site in his new version of the textbook.

    Like

  10. Thanks so much for your help on both installing FLTK and “fixing” the graphics and GUI interface files for the Stroustrup Chapter 12 Drill. Really saved the day for me!

    Like

  11. Hay man, thanks for the post, it really helped me a lot, but I have one problem. When I try to compile the test program from page 1206 from the book Programming, principles and practice using C++ it gives me linker error – cannot open the fltkd.lib file. I believe it is because I did not copied the files from the lib folder from the FLTK folder to the VS/include folder. But in every download that I make from fltk.org the lib folder is empty?! :/ There is only one readme file. Any sugestions? Thanks in advance.

    Like

    1. Actually, I did it. I followed your article again, but this time thoroughly and success! Thanks again, very nice article, thumbs up!

      Like

  12. 1>—— Build started: Project: Project19, Configuration: Debug Win32 ——
    1>Graph.cpp
    1>c:\users\alok bhushan pandey\desktop\graph.cpp(56): warning C4244: ‘=’: conversion from ‘double’ to ‘int’, possible loss of data
    1>c:\users\alok bhushan pandey\desktop\graph.cpp(57): warning C4244: ‘=’: conversion from ‘double’ to ‘int’, possible loss of data
    1>GUI.cpp
    1>c:\users\alok bhushan pandey\desktop\window.h(6): fatal error C1083: Cannot open include file: ‘std_lib_facilities.h’: No such file or directory
    1>Window.cpp
    1>c:\users\alok bhushan pandey\desktop\window.h(6): fatal error C1083: Cannot open include file: ‘std_lib_facilities.h’: No such file or directory
    1>Source.cpp
    1>d:\cpp\project19\project19\graph.h(89): error C2143: syntax error: missing ‘;’ before ‘d:\cpp\project19\project19\graph.h(112): note: see reference to class template instantiation ‘Graph_lib::Vector_ref’ being compiled
    1>d:\cpp\project19\project19\graph.h(89): error C4430: missing type specifier – int assumed. Note: C++ does not support default-int
    1>d:\cpp\project19\project19\graph.h(89): error C2238: unexpected token(s) preceding ‘;’
    1>d:\cpp\project19\project19\graph.h(90): error C2143: syntax error: missing ‘;’ before ‘d:\cpp\project19\project19\graph.h(90): error C4430: missing type specifier – int assumed. Note: C++ does not support default-int
    1>d:\cpp\project19\project19\graph.h(90): error C2238: unexpected token(s) preceding ‘;’
    1>d:\cpp\project19\project19\graph.h(119): error C2061: syntax error: identifier ‘initializer_list’
    1>d:\cpp\project19\project19\graph.h(119): error C2535: ‘Graph_lib::Shape::Shape(void)’: member function already defined or declared
    1>d:\cpp\project19\project19\graph.h(118): note: see declaration of ‘Graph_lib::Shape::Shape’
    1>d:\cpp\project19\project19\graph.h(158): error C2143: syntax error: missing ‘;’ before ‘d:\cpp\project19\project19\graph.h(158): error C4430: missing type specifier – int assumed. Note: C++ does not support default-int
    1>d:\cpp\project19\project19\graph.h(158): error C2238: unexpected token(s) preceding ‘;’
    1>d:\cpp\project19\project19\graph.h(125): error C2065: ‘points’: undeclared identifier
    1>d:\cpp\project19\project19\graph.h(125): error C2228: left of ‘.push_back’ must have class/struct/union
    1>d:\cpp\project19\project19\graph.h(125): note: type is ‘unknown-type’
    1>d:\cpp\project19\project19\graph.h(126): error C2065: ‘points’: undeclared identifier
    1>d:\cpp\project19\project19\graph.h(143): error C2065: ‘points’: undeclared identifier
    1>d:\cpp\project19\project19\graph.h(144): error C2065: ‘points’: undeclared identifier
    1>d:\cpp\project19\project19\graph.h(144): error C2228: left of ‘.size’ must have class/struct/union
    1>d:\cpp\project19\project19\graph.h(144): note: type is ‘unknown-type’
    1>d:\cpp\project19\project19\graph.h(192): error C3861: ‘error’: identifier not found
    1>d:\cpp\project19\project19\graph.h(197): error C3861: ‘error’: identifier not found
    1>d:\cpp\project19\project19\graph.h(238): error C2061: syntax error: identifier ‘initializer_list’
    1>d:\cpp\project19\project19\graph.h(238): error C2535: ‘Graph_lib::Lines::Lines(void)’: member function already defined or declared
    1>d:\cpp\project19\project19\graph.h(237): note: see declaration of ‘Graph_lib::Lines::Lines’
    1>d:\cpp\project19\project19\graph.h(238): error C2065: ‘lst’: undeclared identifier
    1>d:\cpp\project19\project19\graph.h(238): error C2228: left of ‘.size’ must have class/struct/union
    1>d:\cpp\project19\project19\graph.h(238): note: type is ‘unknown-type’
    1>d:\cpp\project19\project19\graph.h(238): error C3861: ‘error’: identifier not found
    1>d:\cpp\project19\project19\graph.h(245): error C4430: missing type specifier – int assumed. Note: C++ does not support default-int
    1>d:\cpp\project19\project19\graph.h(245): error C2143: syntax error: missing ‘,’ before ‘&’
    1>d:\cpp\project19\project19\graph.h(249): error C4430: missing type specifier – int assumed. Note: C++ does not support default-int
    1>d:\cpp\project19\project19\graph.h(249): error C2143: syntax error: missing ‘,’ before ‘&’
    1>d:\cpp\project19\project19\graph.h(250): error C3646: ‘label’: unknown override specifier
    1>d:\cpp\project19\project19\graph.h(250): error C2059: syntax error: ‘(‘
    1>d:\cpp\project19\project19\graph.h(250): error C2334: unexpected token(s) preceding ‘{‘; skipping apparent function body
    1>d:\cpp\project19\project19\graph.h(258): error C3646: ‘lab’: unknown override specifier
    1>d:\cpp\project19\project19\graph.h(258): error C4430: missing type specifier – int assumed. Note: C++ does not support default-int
    1>d:\cpp\project19\project19\graph.h(245): error C2065: ‘s’: undeclared identifier
    1>d:\cpp\project19\project19\graph.h(245): error C2614: ‘Graph_lib::Text’: illegal member initialization: ‘lab’ is not a base or member
    1>d:\cpp\project19\project19\graph.h(249): error C2065: ‘lab’: undeclared identifier
    1>d:\cpp\project19\project19\graph.h(249): error C2065: ‘s’: undeclared identifier
    1>d:\cpp\project19\project19\graph.h(267): error C2061: syntax error: identifier ‘string’
    1>d:\cpp\project19\project19\graph.h(326): error C4430: missing type specifier – int assumed. Note: C++ does not support default-int
    1>d:\cpp\project19\project19\graph.h(326): error C2143: syntax error: missing ‘,’ before ‘&’
    1>d:\cpp\project19\project19\graph.h(329): error C3646: ‘mark’: unknown override specifier
    1>d:\cpp\project19\project19\graph.h(329): error C4430: missing type specifier – int assumed. Note: C++ does not support default-int
    1>d:\cpp\project19\project19\graph.h(326): error C2065: ‘m’: undeclared identifier
    1>d:\cpp\project19\project19\graph.h(326): error C2614: ‘Graph_lib::Marked_polyline’: illegal member initialization: ‘mark’ is not a base or member
    1>d:\cpp\project19\project19\graph.h(333): error C4430: missing type specifier – int assumed. Note: C++ does not support default-int
    1>d:\cpp\project19\project19\graph.h(333): error C2143: syntax error: missing ‘,’ before ‘&’
    1>d:\cpp\project19\project19\graph.h(333): error C2065: ‘m’: undeclared identifier
    1>d:\cpp\project19\project19\graph.h(338): error C3861: ‘string’: identifier not found
    1>d:\cpp\project19\project19\graph.h(361): error C4430: missing type specifier – int assumed. Note: C++ does not support default-int
    1>d:\cpp\project19\project19\graph.h(361): error C2143: syntax error: missing ‘,’ before ‘&’
    1>d:\cpp\project19\project19\graph.h(364): error C2061: syntax error: identifier ‘string’
    1>d:\cpp\project19\project19\window.h(6): fatal error C1083: Cannot open include file: ‘std_lib_facilities.h’: No such file or directory
    1>Generating Code…
    1>Done building project “Project19.vcxproj” — FAILED.
    ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

    Like

  13. OH MY GOD I DID IT!!!
    few minthes I was fighting with this example for a week and failed, but today I decided to take another try and I managed, words can’t tell how proud I am of myself )))
    THANK YOU SO MUCH!

    As Addition I have to say that I had to edit Graph.h a little bit:
    change {} to () in line
    fnt_sz {(fl_size()<14)?14:fl_size()} { add(x); }
    to
    fnt_sz ((fl_size()<14)?14:fl_size()) { add(x); }

    (I'm using VS2010)

    Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

w

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.