Installing FLTK...
In the lab
FLTK is already installed and configured in the Graphics Lab. The files are located in the directory "\".
At home on Windows
These directions are intended for advanced users. The course staff supports the graphics lab development environment, but if you would like to work elsewhere these directions may help. Your mileage may vary.
1. Install FLTK files
- Download the installer
">here.
- Run the installer. It will install FLTK in \.
- Compile your project. If you don't get errors about the file "FL/fl.h" not existing, etc., then you're done! The skeleton code expects the FLTK files to be where the installer puts them, so if you have problems, you should probably contact the CSE 457 staff.
You should not have to complete Steps 2 or 3 to get the project to work. They are here to try only if Step 1 fails.
2. Configure MSVC (Microsoft Visual C++)
- Open MSVC, and click Tools->Options.
- In the left pane, expland "Projects and Solutions"
- Choose "VC++ Directories"
- In the right pane, change the drop-down to "Include Files"
- Add the item "\"
- Add the item "\\png"
- Add the item "\\jpeg"
- Add the item "\\zlib"
- Change the drop-down to "Library Files"
- Add the item "\\lib"
3. Verify that your project is linking with the correct library
- In MSVC, click Project->Settings...
- Click the "C++" tab.
- Change the "Category" drop-down to "Code Generation".
- If the project configuration is Release, change the "Use run-time library"
drop down to "Multithreaded DLL".
- If the project configuration is Debug, change the "Use run-time library"
drop down to "Debug Multithreaded DLL".
- Click the "Link" tab.
- If the project configuration is Release, make sure that "fltk.lib" (and
not "fltkd.lib") is present in edit box labeled "Object/Library modules".
- If the project configuration is Debug, make sure that "fltkd.lib" (and not
"fltk.lib") is present in edit box labeled "Object/Library modules".
That's it!
Installation on Linux
Note: FLTK is already installed on instructional Linux systems (attu and the workstations in the Allen Center labs) in /usr, and on your own Linux system, before attempting to follow these instructions you should look for prepackaged binaries for your own distribution.
1. Install Mesa
As the first step, you must install MesaGL. You can get the source of MesaGL from
here. To install it,
> gunzip MesaLib-3_0_tar.gz
> tar -xvf MesaLib-3_0_tar
> cd Mesa-3.0
> make linux-386
.....
Serveral minutes later, you will have libMesaGL.a and LibMesaGLU.a in Mesa-3.0/lib and
a directory called GL in Mesa-3.0/include. I usually prefer to copy all these files into
~/local/lib and ~/local/include such that I can access all the libraries without remembering
tons of paths.
2. Install Fltk
Now, we try to make fltk. You can get the source from here.
> unzip -source.tar.gz
> tar -xvf -source.tar
> ./configure
> make
Create a local directory in you home dir
Open makeinclude file and change the prefix variable to the your local
directory
> make install
> cp /fluid/fluid ~/local/bin
> cp /
That's it. You will have
'fluid' in ~/local/bin,
two directories, FL and Fl, in include
and libfltk.a in lib.
Now everyting is in ~/local, you need to change the value of the variable, $(LOCAL), in Makefile to
~/local.
Mac
In previous quarters, students have been able to (with some effort) compile the projects on Mac. FLTK can be installed easily by using one of the following package managers: MacPorts or Homebrew.
Thereafter you can install FLTK with the corresponding commands for:
MacPorts: 'sudo port install fltk'
Homebrew: 'brew install fltk
Other
For any other OS, such as an unsupported variant of Windows, or some yet rarer variety of environment you may still be able to use FLTK on your machine.
Download the ">FLTK source and follow the directions provided to compile FLTK for your own system.