I am working through Stroustrup\'s Principles and Practices using C++. I am trying to get the following program to compile.
#include
#include <
You have to link it with the libraries:
g++ -std=c++11 trial.cpp -lfltk -o trial
For your code this library is enough, but depending on what classes you use you might need to add: -lfltk_forms -lfltk_gl -lfltk_images
also.
You can also use fltk-config
as mentioned here:
g++ -std=c++11 `fltk-config --cxxflags` trial.cpp `fltk-config --ldflags` -o trial
Note: it is important to have the linking parameters (-l) after your code files (cpp and includes), otherwise you get compile errors.