Download FLTK 1.3.3
Download VS2010
Download CMake 3.2.0
I assume you‘ve already installed VS2010 and CMake 3.2.0 correctly.
Compile the FLTK:
Start CMake 3.2.0, fill the source and destination:
source: C:/FLTK/fltk-1.3.3
destination: C:/FLTK/VS2010
Click Configure and use Visual Studio 10 2010 to complie.
When first configure is done, select Grouped and Advanced.
CMAKE_INSTALL_PREFIX [C:/FLTK/VS2010_install]
click Configure again.
After configure is done (No errors show), click Generate.
Go back to your build folder, open FLTK.sln, choose Release mode, right click ALL_BUILD, choose Rebuild.
Wait a long time for make process, have a cup of coffee :)
After rebuild is done, right click INSTALL, choose Build.
Now, the configuration is done, enjoy it :)
Create a new empty project,
Project->Project Property->Configuration Properties->VC++Directories ->Include Directories:
C:\FLTK\VS2010_install\include
Project->Project Property->Configuration Properties->VC++Directories ->Library Directories:
C:\FLTK\VS2010_install\lib
Project->Project Property->Configuration Properties->Linker->Input:
wsock32.lib
comctl32.lib
fltk.lib
fltk_jpeg.lib
fltk_images.lib
fltk_forms.lib
fltk_gl.lib
fltk_png.lib
fltk_z.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(); }
FLTK 1.3.3 VS 2010 Configuration 配置
原文:http://www.cnblogs.com/grandyang/p/5140999.html