Start with FLTK

I'm new with FLTK and I'm following the book "Programming-principles and practice using c++". I have done all the steps in D3 and D4, except for D4.4 because my VS2010 doesn't have "C/C++" in the left menu. Until then I have no problem, but when I try to run the example

#include <FL/Fl.H>
#include <FL/Fl_Box.H>
#include <FL/Fl_Window.H>

int main()
{
Fl_Window window( 200, 200, "My window title" );
Fl_Box box( 0, 0, 200, 200, "Hello" );
window.show();
return Fl::run();
}


it doesn't work. Gives me the follow error:

1>------ Build started: Project: teste, Configuration: Debug Win32 ------

1>LINK : error LNK2001: unresolved external symbol _WinMainCRTStartup

1>C:\Users\pc\Documents\Visual Studio 2010\Projects\teste\Debug\teste.exe : fatal error LNK1120: 1 unresolved externals

========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

What is wrong? Some help...please?
Last edited on
mmmm, AFAIK. that means you created the project as a GUI or Win32 GUI or something else
( i don't use VS ) the linker looks for int WINAPI WinMain ( ) entry point w/c is not present in your program ( it's int main() instead )

is there an option to create it as an empty project ?
Topic archived. No new replies allowed.