Initial 3D Builder environment

less than 1 minute read

Inistall FLTK

  • FLTK(Fast Light Toolkit,读做”fulltick”)
  • 通过OpenGL和内建的GLUT模拟器提供3D图形支持
  • Download form offical site
  • Flollow This video
    • Install Cmake gui from office
      • 7361062
      • Remeber set the correct config, I’m using VS2017 and x64 system
      • Configure and Generate
      • Close
    • Select sln file from build dir
    • Open it in VS20XX.
  • Open Demo.exe at fltk-1.3.7\build\bin\test\Release
    • 7324062
    • Have fun.

Develop FLTK project

  • Config for VS2017
    • choose the right 平台 as x64
    • 增加库目录 at VC++目录 \path\to\fltk-1.3.7\build\lib\Debug
    • C/C++ 附加包含目录 \path\to\fltk-1.3.7
    • 连接器[linker] 输入[input] 附加依赖项

      fltkd.lib
      wsock32.lib
      comctl32.lib
      fltk_jpegd.lib
      fltk_imagesd.lib
      
  • Code
#include<FL/Fl.H>
#include<FL/Fl_Box.H>
#include<FL/Fl_Window.H>

int main() {
    Fl_Window window(200, 200, "Window title");
    Fl_Box box(0, 0, 200, 200, "?");
    window.show();
    return Fl::run();
}

7405187

Categories:

Updated: