c++ - 编译时无法打开包含文件 X11/X.h

标签 c++ winapi fltk

我已经将 FL 文件夹复制到项目中。

它向我展示了这个:

1>------ Build started: Project: Client, Configuration: Debug Win32 ------ 1> Main.cpp 1>c:\users\user\documents\visual studio 2012\projects\talktome\talktome\fl\xutf8.h(33): fatal error C1083: Cannot open include file: 'X11/X.h': No such file or directory ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

我的源代码是

using namespace std;

#include "FL\Fl.H"
#include "FL\Fl_Window.H"

#define   WIDTH    700
#define   HEIGHT   500

int main()
{
    Fl_Window win(WIDTH, HEIGHT, "TalkToMe");

    win.begin();
    win.end();

    win.show();

    return Fl::run();
}

最佳答案

你应该检查你的FLTK包含之前是否有“#define WIN32”。会帮助你。它应该。类似的问题在这里:

FLTK in MSVC needs x11 headers?

关于c++ - 编译时无法打开包含文件 X11/X.h,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12374475/

相关文章:

C++ - 仅使用无符号整数实现快速排序?

windows - 为什么调用 ProcessGroupPolicyEx 回调会导致访问冲突?

python - 如何在 Python 3.1 中调用 Windows API?

windows - 如何在 Win32 应用程序中检测 Windows 10 亮/暗模式?

c++ - FL_输入到字符串中

c++ - 商店 Fl :Button value from callback (FLTK)

c++ - 错误 : *** glibc detected *** w5: double free or corruption (fasttop):

c++ - 当字符串末尾被修改时,delete[] 的行为是什么

c++ - 将 cmake 用于 C++ 模板库

c++ - Fl_Window 子类不起作用