CS559 Project Setup
Introduction
The Fast Light Tool Kit ("FLTK", pronounced "fulltick") is a
LGPL'd C++ graphical user interface toolkit for X (UNIX®),
OpenGL®, and Microsoft® Windows® NT 4.0, 95, 98, or
2000.
This document explains the Microsoft Visual C++ 6.0 project
settings that are necessary to build GUI applications with FLTK.
The reader is intended to load the CS559 project-type, and then
step through all of the settings that are necessary to use the
FLTK library. Note that this is neither detailed documentation
on FLTK or MSVC++. For more information about FLTK, see the
project website at
http://www.fltk.org/
Since this documentation is intended for the students in the
Graphics class only, we assume that you are using the
instructional Windows 2000 stations in the CSL labs.
Creating A New FLTK Work Space In Visual C ++ 6.0
-
Open the Microsoft Visual C++ 6.0 application.
-
Choose File->New...
-
On top of the dialog box, click on the Projects Tab.
-
Choose a name for your project and place it in the
Project Name field.
-
Choose a location for your project with the
Location: field; be sure the location
is somewhere on the U: drive if you wish to keep the project.
-
Select the CS559 Project Maker AppWizard option. If this option is not available, you
can choose Win32 Console Application and enter the settings given below.
-
Select OK.
-
You should now see a window listing the paths to the LibTarga and FLTK libraries and
headers. The defaults should be correct, so just choose Finish.
-
You will now see a window sumarizing the project that will be created. Everything should be fine so select OK.
This process should create a new directory with the name you choose, at your
specified location, and will contain the project files.
Note: One big advantage of FlTk over some of the other UI toolkits is
that it can be built into a console application. That means that all of
the C++ standard I/O stuff you used under Unix (like printf or cout) can
be used in your programs.
Walking Through the FLTK Project
Now that the project has been created, we will confirm that all the Visual
Studio settings are correct. First, we'll check the include and library
paths.
-
Select Project->Settings...
-
Choose
All Configurations
option in Settings For: menu.
-
Click C/C++
tab, this should bring up the C/C++ compiler page up.
-
Choose Preprocessor page from
Category menu.
-
In the field
Additional include directories:,
the path
s:\fltk\include
should be present. This tells the compiler where the header files for the
library are.
-
Click Link tab, this should bring up
the linker page.
-
Under Category menu, select
Input.
-
In the Additional library path:
field, you should see the path:
s:\fltk\lib
This allows the linker to find FLTK library binary files.
Next, we'll step through the output format settings which will be used when
generating object files.
-
Click C/C++ tab again.
-
Choose Code Generation in the
Category menu.
-
Select the Win32 Release item, in the
Settings For: menu.
-
Verify that the
Use run-time library option is set to
Multithreaded DLL.
-
Select Win32 Debug item, in the
Settings For: menu.
-
Verify that the
Use run-time library option is set to
Debug Multithreaded DLL.
Finally, we'll verify that the linker knows where to find the essential
libraries it needs to create an executable file. Notice that there are
settings for both the "Debug" and "Release" versions. For debug, the debug
version of the FLTK library is also specified.
-
Click Link tab.
-
Select Win32 Release item, in the
Setting For: menu.
-
Verify that the Object/library modules:
includes the following two extries:
fltk.lib     wsock32.lib
-
Select Win32 Debug item, in the
Setting For: menu.
-
Verify that the Object/library modules:
includes the following two entries:
fltkd.lib     wsock32.lib
-
Then click Ok.
Project setup is complete. You are now ready to add some source code to your FLTK project.
Last modified:
16:45 Sep 1, 2002