/*this document is talking about the procedure when I install the fltk library under linux, ubuntu*/
1.download fltk-source.tar.gz from www.fltk.org
2.untar it: tar -zxvf xxx.tar.gz
3.create my own dictionary: cd /home/hebi/Software/
mkdir fltk
cd fltk
mkdir bin lib include
4.follow the README to apt-get the dependences
5../configure follow as what can be found on Internet by searching.
6.make
7.make install
when you want to use it, be sure to write the .cxx with include</home/hebi/So../include/FL/Fl_Window.H>, it must be the full path. the simple way is being searching.
It can solve like this: cp the FL dir to /usr/include so that when using <FL/Fl_Window.H>, gcc can find the head file. There must be some methods better, may be using enviroment variety.
To compile it, following as the programming manual downloaded in the man page of fltk, the makefile should be like this:
test: fltktest.cxx
g++ fltktest.cxx -o fltktest -L/home/hebi/Software/fltk/lib -lfltk -lXext -lX11 -lm
clean
rm *.o
when trying to run the executable file, the error "cannot find lib or can not open .o"( or something like this) occur. than, edit the /etc/lib.d.conf(or something look like this) and enter the line:"/usr/local/lib/", than run "ldconfig -v"(or something like this) to refresh the libs.
浙公网安备 33010602011771号