On 08.11.2011 03:22, Coder wrote: > I get an error trying to compile with mingW on windows. > > $fltk-config --compile myfirstwindow.cxx > g++ -I/usr/local/include -I/usr/local/include/FL/images -mwindows -DWIN32 > -DUSE_OPENGL32 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -o 'MyFirstWindow' > 'MyFirstWindow.cxx' -mwindows /usr/local/lib/libfltk.a -lole32 -luuid > -lcomctl32 > c:/mingw/bin../lib/gcc/mingw32/4.5.2/../../../libmingw32.a(main.o):main.c(.text+0xd2): > undefined reference to 'WinMain@16' > collect2: ld returned 1 exit status
To be recise, this is not a compile, but a link error. It says that the linker can't find a (the) WinMain function. > How can I solve it? This should not happen. FLTK provides a WinMain function, so that you can use a standard main() function. Which FLTK version is this? Did you define FL_DLL in your source code? If yes, please remove it and try again. If this doesn't help (or doesn't apply), try to compile your program directly with the FLTK version in the source tree (where you built it). This is as simple as adding the path to your build tree to the fltk-config command, i.e. $ /path/to/fltk-build/fltk-config --compile myfirstwindow.cxx Does this change anything? Albrecht _______________________________________________ fltk mailing list fltk@easysw.com http://lists.easysw.com/mailman/listinfo/fltk