2010-10-28 18:13:01 +04:00
|
|
|
README.Unix.txt - 2010-10-28 - Building FLTK on Unix
|
|
|
|
-----------------------------------------------------
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
CONTENTS
|
|
|
|
==========
|
|
|
|
|
|
|
|
1 INTRODUCTION
|
|
|
|
2 PREREQUISITES
|
|
|
|
2.1 Ubuntu 10
|
2010-10-30 18:51:32 +04:00
|
|
|
2.2 Linux Mint 9
|
|
|
|
2.3 Fedora 13
|
2010-10-28 18:49:12 +04:00
|
|
|
2.4 * http://www2.mandriva.com/
|
|
|
|
2.5 * http://www.opensuse.org/en/
|
|
|
|
2.6 * http://www.debian.org/
|
|
|
|
2.7 * Mandrake?
|
|
|
|
2.8 * Sun?
|
|
|
|
2.9 * SGI?
|
|
|
|
2.10 * HPUX?
|
2010-10-28 18:13:01 +04:00
|
|
|
3 HOW TO BUILD FLTK USING GCC
|
|
|
|
3.1 Prerequisites
|
|
|
|
3.2 Downloading and Unpacking
|
|
|
|
3.3 Configuring FLTK
|
|
|
|
3.4 Building FLTK
|
|
|
|
3.5 Testing FLTK
|
|
|
|
3.6 Installing FLTK
|
|
|
|
3.7 Creating new Projects
|
2010-10-28 18:49:12 +04:00
|
|
|
4 * CODE::BLOCKS
|
2010-10-30 18:51:32 +04:00
|
|
|
5 DOCUMENT HISTORY
|
2010-10-28 18:13:01 +04:00
|
|
|
|
2010-10-30 18:51:32 +04:00
|
|
|
* TODO: we still need to write these chapters
|
2010-10-28 18:13:01 +04:00
|
|
|
|
2010-10-30 18:51:32 +04:00
|
|
|
|
2010-10-30 20:50:44 +04:00
|
|
|
|
2010-10-30 18:51:32 +04:00
|
|
|
1 INTRODUCTION
|
|
|
|
=================
|
2010-10-28 18:13:01 +04:00
|
|
|
|
|
|
|
FLTK currently supports the following development environments on vmost Unix
|
|
|
|
platforms:
|
|
|
|
|
|
|
|
- gcc command line tools
|
|
|
|
- Code::Blocks
|
|
|
|
- ...
|
|
|
|
|
2010-10-30 20:50:44 +04:00
|
|
|
The Symbol font and the Zapf Dingbats font do not work on X11. This is correct
|
|
|
|
behavior for UTF-8 platforms.
|
|
|
|
|
|
|
|
|
2010-10-28 18:13:01 +04:00
|
|
|
|
2010-10-30 18:51:32 +04:00
|
|
|
2 PREREQUISITES
|
|
|
|
==================
|
2010-10-28 18:13:01 +04:00
|
|
|
|
|
|
|
|
2010-10-30 18:51:32 +04:00
|
|
|
2.1 Ubuntu 10
|
|
|
|
----------------
|
2010-10-28 18:13:01 +04:00
|
|
|
|
|
|
|
Ubuntu Linux can be downloaded here:
|
|
|
|
|
2010-10-30 18:51:32 +04:00
|
|
|
http://www.ubuntu.com/
|
2010-10-28 18:13:01 +04:00
|
|
|
|
|
|
|
If you have not done so yet, download and install Ubuntu.
|
|
|
|
|
|
|
|
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
|
2010-10-30 18:51:32 +04:00
|
|
|
|
|
|
|
These two are optional, but highly recommended:
|
|
|
|
|
2010-10-28 18:13:01 +04:00
|
|
|
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://svn.easysw.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
|
|
|
|
|
|
|
|
|
2010-10-30 18:51:32 +04:00
|
|
|
2.2 Linux Mint 9
|
|
|
|
-------------------
|
|
|
|
|
|
|
|
Linux Mint 9 can be downloaded here:
|
|
|
|
|
|
|
|
http://www.linuxmint.com/
|
|
|
|
|
|
|
|
If you have not done so yet, download and install Linux Mint.
|
|
|
|
|
|
|
|
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://svn.easysw.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
|
2010-10-28 18:13:01 +04:00
|
|
|
|
2010-10-30 18:51:32 +04:00
|
|
|
svn update
|
2010-10-28 18:13:01 +04:00
|
|
|
|
2010-10-30 18:51:32 +04:00
|
|
|
FIXME: no FL_SYMBOL font (-*-symbol-*), font 15 (Zapf-Dingbats)
|
2010-10-28 18:13:01 +04:00
|
|
|
|
2010-10-30 18:51:32 +04:00
|
|
|
|
|
|
|
2.3 Fedora 13
|
|
|
|
-------------------
|
|
|
|
|
|
|
|
Fedora 13 Linux can be downloaded here:
|
|
|
|
|
|
|
|
http://fedoraproject.org/
|
|
|
|
|
|
|
|
If you have not done so yet, download and install Fedora.
|
|
|
|
|
|
|
|
Open a terminal window and install some software. In Fedora, the default user
|
|
|
|
has no permission to call "sudo", so we will change user a few times:
|
|
|
|
|
|
|
|
su root
|
|
|
|
yum groupinstall "Development Tools"
|
|
|
|
yum groupinstall "X Software Development"
|
|
|
|
|
|
|
|
If you are planning to use the Code::Blocks IDE, also install this
|
|
|
|
|
|
|
|
yum install codeblocks.i686 (for 64 bit machines)
|
|
|
|
|
|
|
|
Don't forget to leave root status (Ctrl-D) before loading FLTK. To install FLTK
|
|
|
|
for every user, you either have to set root user again, or use "visudo" to add
|
|
|
|
yourself to the "sudo" list.
|
|
|
|
|
|
|
|
I like to use subversion to install the latest FLTK-1.3.release:
|
|
|
|
|
|
|
|
svn co http://svn.easysw.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)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3 HOW TO BUILD FLTK USING GCC
|
|
|
|
================================
|
|
|
|
|
|
|
|
|
|
|
|
3.1 Downloading and Unpacking
|
|
|
|
--------------------------------
|
2010-10-28 18:13:01 +04:00
|
|
|
|
|
|
|
Download FLTK from here:
|
|
|
|
|
|
|
|
http://www.fltk.org/software.php
|
|
|
|
|
|
|
|
If you are familiar with "subversion" and like to stay current with your
|
|
|
|
version, you will find the subversion access parameters at the bottom of that
|
|
|
|
page. Unpack FLTK into a convinient location. I like to have everything in my
|
|
|
|
dev directory:
|
|
|
|
|
|
|
|
cd
|
|
|
|
mkdir dev
|
|
|
|
cd dev
|
|
|
|
mv ~/Downloads/fltk-1.3.xxxx.tar.gz .
|
|
|
|
tar xvfz fltk-1.3.xxxx.tar.gz
|
|
|
|
cd fltk-1.3.xxxx
|
|
|
|
|
|
|
|
|
2010-10-30 18:51:32 +04:00
|
|
|
3.2 Configuring FLTK
|
|
|
|
-----------------------
|
2010-10-28 18:13:01 +04:00
|
|
|
|
|
|
|
Stay in your FLTK source-code directory. Type:
|
|
|
|
|
|
|
|
autoconf
|
|
|
|
|
|
|
|
Now configure your FLTK installation:
|
|
|
|
|
|
|
|
./configure
|
|
|
|
|
|
|
|
ADVANCED: type "./configure --help" to get a complete list of optional
|
|
|
|
configurations parameters. These should be pretty self-explenatory. Some
|
|
|
|
more details can be found in README.
|
|
|
|
:END_ADVANCED
|
|
|
|
|
|
|
|
The configuration script will check your machine for the required resources
|
|
|
|
which you should have installed as described in the Perequisites chapter. Review
|
|
|
|
the Configuration Summary, maybe take some notes.
|
|
|
|
|
|
|
|
|
2010-10-30 18:51:32 +04:00
|
|
|
3.3 Building FLTK
|
|
|
|
--------------------
|
2010-10-28 18:13:01 +04:00
|
|
|
|
|
|
|
Now this is easy. Stay in your FLTK source-code directory and type:
|
|
|
|
|
|
|
|
make
|
|
|
|
|
|
|
|
The entire FLTK toolkit including many test programs will be built for you. No
|
|
|
|
warnings should appear. If some do, please let the FLTK developer team know via
|
|
|
|
the mailing list or the bug reporting template at www.fltk.org .
|
|
|
|
|
|
|
|
Actually, as of Oct 28 2010, quite a bunch of warnigns will show, mostly about
|
|
|
|
suggested parenthesis. Please ignore them until we can fix them.
|
|
|
|
|
|
|
|
|
2010-10-30 18:51:32 +04:00
|
|
|
3.4 Testing FLTK
|
|
|
|
-------------------
|
2010-10-28 18:13:01 +04:00
|
|
|
|
|
|
|
After a successful build, you can test FLTK's capabilities:
|
|
|
|
|
|
|
|
test/demo
|
|
|
|
|
|
|
|
|
2010-10-30 18:51:32 +04:00
|
|
|
3.5 Installing FLTK
|
|
|
|
----------------------
|
2010-10-28 18:13:01 +04:00
|
|
|
|
|
|
|
If you did not change any of the configuration settings, FLTK will be installed
|
|
|
|
in "/usr/local/include" and "/usr/local/lib" by typing
|
|
|
|
|
|
|
|
sudo make install
|
|
|
|
|
|
|
|
It is possible to install FLTK without superuser previleges by changing the
|
|
|
|
installation path to a location within the user account by adding the
|
|
|
|
"--prefix=PREFIX" parameters to the "./configure" command.
|
|
|
|
|
|
|
|
|
2010-10-30 18:51:32 +04:00
|
|
|
3.6 Creating new Projects
|
|
|
|
----------------------------
|
2010-10-28 18:13:01 +04:00
|
|
|
|
|
|
|
FLTK provides a neat script named "fltk-config" that can provide all the flags
|
|
|
|
needed to build FLTK applications using the same flags that were used to build
|
|
|
|
the library itself. Running "fltk-config" without arguments will print a list
|
|
|
|
options. The easiest call to compile an FLTK application from a single source
|
|
|
|
file is:
|
|
|
|
|
|
|
|
fltk-config --compile myProgram.cxx
|
|
|
|
|
|
|
|
"fltk-config" and "fluid" will be installed in "/usr/local/bin/" by default. I
|
|
|
|
recommend that you add it to the command search path.
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-10-30 18:51:32 +04:00
|
|
|
4 CODE::BLOCKS
|
|
|
|
=================
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5 DOCUMENT HISTORY
|
|
|
|
=====================
|
2010-10-28 18:13:01 +04:00
|
|
|
|
|
|
|
Oct 28 2010 - matt: restructured entire document and verified instructions
|