Code::Blocks provides project templates for both GLUT and FLTK, but no for GLUT + FLTK. Here is a procedure to build a simple GLUT + FLTK program in Code::Blocks.
1. Build up a new project for GLUT by using the Code::Blocks' template.
2. Add search directories setting to the include and library directories of FLTK.
3. Modify #include <GL/glut.h> in main.cpp to #include<FL/glut.H>
4. Modify the Linker settings as follows
1) Add other linker options: -mwindows
2) Link libraries as: fltk_images, fltk_gl, fltk, fltk_png, fltk_z, fltk_jpeg, glu32, opengl32, ole32, uuid, comctl32. Pay attention to that the sequential order of those libraries is important.
The project would be rebuilt successfully. You can then add FLTK functions as you like.
没有评论:
发表评论