Download FLTK 1.3.3
Download VS2010
I assume you've already installed VS2010 correctly.
Compile the FLTK:
Go to your FLTK 1.3.3 folder (C:\FLTK\fltk-1.3.3\ide\VisualC2010), open fltk.sln, choose Release mode, right click Solution 'fltk' (79 projects), choose Rebuild.
Wait a long time for make process, have a cup of coffee :)
Now, the configuration is done, enjoy it :)
Create a new empty project,
Project->Project Property->Configuration Properties->VC++Directories ->Include Directories:
C:\FLTK\fltk-1.3.3
Project->Project Property->Configuration Properties->VC++Directories ->Library Directories:
C:\FLTK\fltk-1.3.3\lib
Project->Project Property->Configuration Properties->Linker->Input:
wsock32.libcomctl32.libfltk.libfltkforms.libfltk_forms.libfltkgl.libfltk_gl.libfltkimages.libfltk_images.libfltkjpeg.libfltk_jpeg.libfltkpng.libfltk_png.libfltkzlib.libfltk_zlib.lib
Create a test.cpp file as below:
#define WIN32
#include "FL/Fl.h"
#include "FL/Fl_Box.h"
#include "FL/Fl_Window.h"
int main()
{
Fl_Window window(500,500, "Test");
Fl_Box box(0,0,500,500,"Hello World!");
window.show();
return Fl::run();
}
发表评论