日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程语言 > c/c++ >内容正文

c/c++

VC6下编译fltk-1.3.5

發布時間:2023/12/31 c/c++ 34 豆豆
生活随笔 收集整理的這篇文章主要介紹了 VC6下编译fltk-1.3.5 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

?

FLTK官方地址:https://www.fltk.org/index.php

fltk-1.1.10編譯說明

打開visualc/fltk.dsw文件

編譯fltk工程得到fltk.lib

編譯hello工程,一個最簡單的例子編譯完畢

?

fltk-1.3.5編譯說明

工程位置在ide/VisualC6/fltk.dsw

要依次編譯fltk_zib,fltk_jepg,fltk_png

接下來fltk才可以編譯,不會會報錯,但改起來也比較簡單

第一個問題,類中靜態變量無法直接初始化(新的標準應該支持)

涉及文件Fl_Image.H,Fl_Device.H

Fl_Image.H

class FL_EXPORT Fl_Image { ? public:static const int ERR_NO_IMAGE ???= -1;static const int ERR_FILE_ACCESS = -2;static const int ERR_FORMAT ?????= -3;...... }

修改為

class FL_EXPORT Fl_Image { ? public:static const int ERR_NO_IMAGE ?;static const int ERR_FILE_ACCESS ;static const int ERR_FORMAT ???;...... }

并在Fl_Image.cxx文件中初始化

const int Fl_Image::ERR_NO_IMAGE ???= -1; const int Fl_Image::ERR_FILE_ACCESS = -2; const int Fl_Image::ERR_FORMAT ?????= -3;

同樣修改Fl_Device.H中內容

static const int matrix_stack_size = FL_MATRIX_STACK_SIZE; static const int region_stack_max = FL_REGION_STACK_SIZE - 1;

修改為

static const int matrix_stack_size ; static const int region_stack_max ;

并在Fl_Device.cxx中添加

const int Fl_Graphics_Driver::matrix_stack_size = FL_MATRIX_STACK_SIZE; const int Fl_Graphics_Driver::region_stack_max = FL_REGION_STACK_SIZE - 1;

第二個問題,for循環中變量聲明問題,一個位置不太好,一個被視為重復聲明

fl_font_win32.cxx

for(unsigned ll = 0; ll < len; ll++) { ... }

聲明放到函數開始位置?

unsigned ll = 0; //挪到函數開始位置 for(ll = 0; ll < len; ll++) { ... }

l_gleam.cxx中 2個for循環中I被視為重復聲明

for (int ?i = 0; i < h_top; i++, k -= step_size_top) { ... } ... for (int ?i = 0; i < h_bottom; i++, k -= step_size_bottom) { ... }

修改為

int i=0; for ( i = 0; i < h_top; i++, k -= step_size_top) { ... } ... for ( i = 0; i < h_bottom; i++, k -= step_size_bottom) { ... }

fltk.lib編譯成功

最簡單的例子hello也可以編譯成功

總結

以上是生活随笔為你收集整理的VC6下编译fltk-1.3.5的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。