Re: [fltk.general] FLTK compile error

2011-11-08 Thread Albrecht Schlosser
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


Re: [fltk.general] FLTK compile error

2011-11-08 Thread Albrecht Schlosser
On 08.11.2011 09:27, Albrecht Schlosser wrote:

 To be recise, this is not a compile, but a link error.

To be precise, this should read ... ;-)

Albrecht
___
fltk mailing list
fltk@easysw.com
http://lists.easysw.com/mailman/listinfo/fltk


Re: [fltk.general] FLTK compile error

2011-11-07 Thread Greg Ercolano
On 11/07/11 18:22, Coder wrote:
 Hi,
 
 
 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
 
 
 How can I solve it?

Curious: are you able to compile the test/hello.cxx program
that comes with FLTK using the same command?

___
fltk mailing list
fltk@easysw.com
http://lists.easysw.com/mailman/listinfo/fltk


Re: [fltk.general] FLTK compile error

2011-11-07 Thread Edzard Egberts
Coder schrieb:
 Hi,


 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


 How can I solve it?

Looks like there is no main function in your project, something like 
int main() or int main(int argc, const char* argv[]).

___
fltk mailing list
fltk@easysw.com
http://lists.easysw.com/mailman/listinfo/fltk