我是C ++和Fltk的新手。伙计们,这段代码运行良好:
#include <FL/Fl.H>
#include <FL/Fl_Window.H>
#include <FL/Fl_Box.H>
#include <FL/Fl_Button.H>
int main(int argc, char **argv) {
Fl_Window *window = new Fl_Window(800, 400);
Fl_Box *box = new Fl_Box(20,40,300,100,"Hello, World!");
box->box(FL_NO_BOX);
box->labeltype(FL_SHADOW_LABEL);
Fl_Button *GG = new Fl_Button(150,90,40,30,"GG");
GG->type(FL_NORMAL_BUTTON);
window->end();
window->show(argc, argv);
return Fl::run();
}
但是当我尝试这段代码时(使用时Fl_xyz_Button.H
):
#include <FL/Fl.H>
#include <FL/Fl_Window.H>
#include <FL/Fl_Box.H>
#include <FL/Fl_xyz_Button.H>
int main(int argc, char **argv) {
Fl_Window *window = new Fl_Window(800, 400);
Fl_Box *box = new Fl_Box(20,40,300,100,"Hello, World!");
box->box(FL_NO_BOX);
box->labelfont(FL_BOLD+FL_ITALIC);
box->labelsize(36);
box->labelcolor(FL_WHITE);
box->labeltype(FL_SHADOW_LABEL);
Fl_xyz_Button *GG = new Fl_xyz_Button(150,90,40,30,"GG");
GG->type(FL_NORMAL_BUTTON);
window->end();
window->show(argc, argv);
return Fl::run();
}
告诉我错误:
"FL/Fl_xyz_Button.H: No such file or directory"
而且我看到/usr/local/include/FL
没有Fl_xyz_Button.H
?? 我该如何解决?或下载Fl_xyz_Button.H
并将其放在/usr/local/include/FL
文件夹中?
我在其中搜索,没有任何争议?
我在Visual Studio Code上使用Xubutu(.deb)。
xyz
只是其中一种可能的按钮类型的占位符名称,请查阅文档以获取可用的类型和相应的标题:
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句