This tutorial will show you how to open an FLTK window. We will
build on the project from the previous tutorial so please complete it
first if you haven't already.
Before we start, please first download a proper FLTK library according to the
vesion of VS you use. We support VS 2019 for this class and provide a pre-built FLTK
library fltk-1.3.5-vs2019 for Windows 10.
#ifndef
MY_WINDOW_H |
#include
"MyWindow.h" |
#include
<Fl/Fl.h> |
Click OK. |
|
We now need to tell VS where to find the pre-built fltk libraries. Similarly, choose Project -> Properties from the VS menus and you should get the dialog to the right. In the left hand pane go to Configuration Properties -> Linker ->General, then choose Additional Libary Directories. Input E:\code\fltk\lib, supposing you placed a copy of FLTK there. Click OK. |
Now that VS knows where to find the FLTK library we need to tell it which libraries we're interested in. Similarly, choose Project -> Properties from the VS menus and you should get the dialog to the right. In the left hand pane go to Configuration Properties -> Linker ->Input, then choose Additional Dependencies. Input fltkdlld.lib, which is the FLTK debug dll library file that this project uses. Click OK. |
|
Go to the Project Property page in the same way as Step 3, and choose C/C++ -> Code Generation from the left hand pane and set the Runtime
Library to Multi-threaded
Debug DLL (/MDd). |
|
Go to the Project Property page in the same way as Step 3, and choose Debugging
from the left hand pane. Suppose you placed a copy of FLTK at E:\Course\fltk. So set the Working Directory as E:\Course\fltk\lib which contains the FLTK dll files. |
|