zoukankan      html  css  js  c++  java
  • fltk试用 (1)

    先安装基本的库,用aptget可以自动安装依赖
    sudo apt-get install libfltk1.1-dev libfltk1.1

    下载一个最新的源代码,编译

    tar avzf fltkxxx
    cd fltkxxx
    ./configure
    make
    sudo make install

    cutepig@ubuntu:~/Downloads/fltk-1.3.0$ sudo make install
    === installing FL ===
    Installing include files in /usr/local/include...
    === installing jpeg ===
    Installing ../lib/libfltk_jpeg.a in /usr/local/lib...
    Installing jpeg headers in /usr/local/include/FL/images...
    === installing zlib ===
    Installing libfltk_z.a in /usr/local/lib...
    Installing zlib headers in /usr/local/include/FL/images...
    === installing png ===
    Installing libfltk_png.a in /usr/local/lib...
    Installing png headers in /usr/local/include/FL/images...
    === installing src ===
    Installing libraries in /usr/local/lib...
    === installing fluid ===
    Installing FLUID in /usr/local/bin...
    === installing test ===
    Installing example programs to /usr/local/share/doc/fltk/examples...
    === installing documentation ===
    Installing documentation files in /usr/local/share/doc/fltk ...
    Installing man pages in /usr/local/share/man ...
    cutepig@ubuntu:~/Downloads/fltk-1.3.0$

    写一个例子程序
    #include <FL/Fl.H>
    #include <FL/Fl_Window.H>
    #include <FL/Fl_Button.H>
     
    int main(int argc, char *argv[]) {
       Fl_Window* w = new Fl_Window(330, 190);
       new Fl_Button(110, 130, 100, 35, "Okay");
       w->end();
       w->show(argc, argv);
       return Fl::run();
    }

    编译运行

    g++ test.cpp -lfltk  -lX11 -lm

    参考网址

    下载源代码

    http://www.fltk.org/

    入门文档

    http://www.fltk.org/documentation.php/doc-1.1/basics.html#basics

  • 相关阅读:
    爬虫07-requests库cookie和session
    爬虫06-处理不信任的SSL证书
    爬虫05-requests库用法
    爬虫04-cookie
    网络爬虫-爬取拉勾网不成功,登录设置cookie
    爬虫03-简单使用代理
    爬虫02-简单伪装浏览器
    爬虫01-urllib常用函数
    01-matplotlib简单绘图
    21-pandas_apply和transform
  • 原文地址:https://www.cnblogs.com/cutepig/p/2173056.html
Copyright © 2011-2022 走看看