質問

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();
}
役に立ちましたか?

解決

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?

他のヒント

  • Do not use the \ in the include statements. Use the forward slash / .

  • The problems you refer to in your comment to Mycotoxin clearly indicate you have linking problems. You have to tell your compiler where to find the fltk library and the header files. Unresolved external symbols mean only one thing you know... :)

  • You do not have to define WIN32 as described in Mycotoxin's text. The compiler does that for you, and FLTK uses this fact. Even if it does not, you typically give it as a parameter to the compiler (something like -DWIN32 in the case of GCC or similar for CL).

  • Watch Greg's video tutorial at http://seriss.com/people/erco/fltk-videos/ where he explains how to configure FLTK and build a small app using Microsoft Visual Studio 7.

  • Finally, get the source package, and read the README.MSWindows.txt file. It explains everything you need to know in order to build your FLTK-based application on Windows.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top