C++ – Cannot open include file X11/X.h when compiling

cfltkwinapi

I've copied the FL folder into the project.

and it show me this:

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 ==========

my source code is

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();
}

Best Answer

You should check if there is "#define WIN32" before your FLTK includes. will help you. It should. Simular problem here:

FLTK in MSVC needs x11 headers?

Related Topic