I have been trying to install this FLTK library:
sudo apt-get install libfltk1.3-dev
sudo apt-get install libx11-dev
I created simple main.cpp
:
#include <fltk/Window.h>
#include <fltk/Widget.h>
#include <fltk/run.h>
using namespace fltk;
int main(int argc, char **argv) {
Window *window = new Window(300, 180);
window->begin();
Widget *box = new Widget(20, 40, 260, 100, "Hello, World!");
box->box(UP_BOX);
box->labelfont(HELVETICA_BOLD_ITALIC);
box->labelsize(36);
box->labeltype(SHADOW_LABEL);
window->end();
window->show(argc, argv);
return run();
}
and tried to compile using:
g++ -o win main.cpp
After this failure I followed the original instruction what come with FLTK which looked like this
Open a shell and install some software:
sudo apt-get install g++ sudo apt-get install gdb sudo apt-get install subversion sudo apt-get install autoconf sudo apt-get install libx11-dev sudo apt-get install libglu1-mesa-dev
These two are optional, but highly recommended:
sudo apt-get install libasound2-dev sudo apt-get install libxft-dev
If you are planning to use the Code::Blocks IDE, also install this
sudo apt-get install codeblocks
I like to use subversion to install the latest FLTK-1.3.release:
svn co http://seriss.com/public/fltk/fltk/branches/branch-1.3/ fltk-1.3
To update to the latest version, just go into the fltk-1.3 directory and type
svn update
FIXME: no FL_SYMBOL font (--symbol-), font 15 (Zapf-Dingbats)
When I tried to run this line
svn co http://seriss.com/public/fltk/fltk/branches/branch-1.3/ fltk-1.3
I was asked for some password and I just entered my Ubuntu username password, which of course was not correct. Probably shouldn't have done it anyway
Authentication realm: <http://seriss.com:80> Subversion repository
So this is my story and here I am asking for some advice!
EDIT : Here is the older code that also didn't work
#include <FL/Fl.h>
#include <FL/Fl_Box.h>
#include <Fl/Fl_Windows.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()
}
This was the error :
main.cpp:1:19: fatal error: FL/Fl.h: No such file or directory
#include <FL/Fl.h>
^
compilation terminated.
libfltk1.3-dev
?