Compile FLTK with g++

限于喜欢 提交于 2019-12-03 07:30:27

You have to link it with the libraries:

g++ -std=c++11 trial.cpp -lfltk -o trial

For your code this library is enough, but depending on what classes you use you might need to add: -lfltk_forms -lfltk_gl -lfltk_images also.

You can also use fltk-config as mentioned here:

g++ -std=c++11 `fltk-config --cxxflags` trial.cpp  `fltk-config --ldflags` -o trial

Note: it is important to have the linking parameters (-l) after your code files (cpp and includes), otherwise you get compile errors.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!