Hi

I have Microsoft Visual C++ 2008 Express Edition and I downloaded fltk from fltk.org. When I tried compiling it, i got many of these errors:

LINK : fatal error LNK1181: cannot open input file 'fltk.lib'

How do i compile FLTK now? Please help

I read the directions in the documentation, and I followed the directions, but it didn't work, it still gave me the same error.

My linker settings seem to be ok...

In your linker settings have you typed in the complete path to where fltk.lib is located ? By default it'll look for it in the current project directory. If fltk.lib is something you are supposed to compile also, then make sure that project is added as a dependency for your current project, so that it compiles before, and fltk.lib exists for you to use.

thanks, stilllearning and William. I got FLTK compiled, but when I try to compile and run the following program, I get the error messages under that.

#include <FL/FL.h>
#include <FL/FL_Window.h>

int main() {
    FL_Window win(400, 200);
    win.show();
    return FL::run();
}

Error messages:
error C2065: 'FL_Window' : undeclared identifier
error C2146: syntax error : missing ';' before identifier 'win'
error C3861: 'win': identifier not found
error C2065: 'win' : undeclared identifier
error C2228: left of '.show' must have class/struct/union

sorry if the answer is obvious, I am new to C++ :)

Edited 3 Years Ago by Reverend Jim: Fixed formatting

This article has been dead for over six months. Start a new discussion instead.