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

歡迎訪問(wèn) 生活随笔!

生活随笔

當(dāng)前位置: 首頁(yè) > 编程语言 > c/c++ >内容正文

c/c++

VC6下编译fltk-1.3.5

發(fā)布時(shí)間:2023/12/31 c/c++ 42 豆豆
生活随笔 收集整理的這篇文章主要介紹了 VC6下编译fltk-1.3.5 小編覺(jué)得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.

?

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

fltk-1.1.10編譯說(shuō)明

打開(kāi)visualc/fltk.dsw文件

編譯fltk工程得到fltk.lib

編譯hello工程,一個(gè)最簡(jiǎn)單的例子編譯完畢

?

fltk-1.3.5編譯說(shuō)明

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

要依次編譯fltk_zib,fltk_jepg,fltk_png

接下來(lái)fltk才可以編譯,不會(huì)會(huì)報(bào)錯(cuò),但改起來(lái)也比較簡(jiǎn)單

第一個(gè)問(wèn)題,類(lèi)中靜態(tài)變量無(wú)法直接初始化(新的標(biāo)準(zhǔn)應(yīng)該支持)

涉及文件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中內(nèi)容

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;

第二個(gè)問(wèn)題,for循環(huán)中變量聲明問(wèn)題,一個(gè)位置不太好,一個(gè)被視為重復(fù)聲明

fl_font_win32.cxx

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

聲明放到函數(shù)開(kāi)始位置?

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

l_gleam.cxx中 2個(gè)for循環(huán)中I被視為重復(fù)聲明

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編譯成功

最簡(jiǎn)單的例子hello也可以編譯成功

總結(jié)

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

如果覺(jué)得生活随笔網(wǎng)站內(nèi)容還不錯(cuò),歡迎將生活随笔推薦給好友。