MSVC 中的 FLTK 需要 x11 标头吗?
我现在正在尝试学习如何使用 FLTK(在 MSVC 2008 中)。我正确编译了所有库,但是当我尝试运行该程序时:
#include "FL/Fl.H" #include "FL/Fl_Window.H" #include "FL/Fl_Box.H" int main(int argc, char *argv[]) { Fl_Window *window = new Fl_Window(340, 180); Fl_Box *box = new Fl_Box(20, 40, 300, 100, "Hello, World!"); box->box(FL_UP_BOX); box->labelfont(FL_BOLD + FL_ITALIC); box->labelsize(36); box->labeltype(FL_SHADOW_LABEL); window->end(); window->show(); return Fl::run(); }
我收到此错误,
1>c:\fltk\fl\xutf8.h(33) : fatal error C1083: Cannot open include file: 'X11/X.h': No such file or directory
我可以看出它缺少 x11,但我进行了快速谷歌搜索,但找不到有关此主题的任何帮助。顺便说一句,我正在运行 v1.3.0。
感谢您抽出时间。
I'm trying to learn how to use FLTK right now (In MSVC 2008). I got all the the libraries compiled correctly, but when I tried to run this program:
#include "FL/Fl.H" #include "FL/Fl_Window.H" #include "FL/Fl_Box.H" int main(int argc, char *argv[]) { Fl_Window *window = new Fl_Window(340, 180); Fl_Box *box = new Fl_Box(20, 40, 300, 100, "Hello, World!"); box->box(FL_UP_BOX); box->labelfont(FL_BOLD + FL_ITALIC); box->labelsize(36); box->labeltype(FL_SHADOW_LABEL); window->end(); window->show(); return Fl::run(); }
I got this error
1>c:\fltk\fl\xutf8.h(33) : fatal error C1083: Cannot open include file: 'X11/X.h': No such file or directory
I can tell that it is missing x11, but I did a quick google search, and I couldn't find any help on this subject. BTW, I'm running v1.3.0.
Thanks for your time.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我找到了答案,在 FLTK 包含之前添加“#define WIN32”。
I found the answer, add "#define WIN32" before your FLTK includes.