RE: fltk compilation error
Ken Dibble wrote: > I am unable to determince what the error is, not knowing > anything about > gcc, fltk or fltk-config > > the following command produces a gui executable (at least for this > trivial example) which prints "Hello World" to the console when Open > is > selected from the > File menu. > > gcc test.cxx -lfltk -lstdc++ > http://ccrma.stanford.edu/planetccrma/man/man1/fltk-config.1.html fltk-config is a utility script that can be used to get information about the current version of FLTK that is installed on the system, what compiler and linker options to use when building FLTK- based applications, and to build simple FLTK applications. So, fltk-config --compile test.cxx 'should' compile test.cxx and the other associated fluid generated files into test.exe. It attempts to do this ala: $ fltk-config --compile test.cxx <- this command call results in the compilation call listed on the next line. gcc -mwindows -DWIN32 -o test test.cxx -mwindows /usr/lib/libfltk.a -lole32 -luuid -lcomctl32 -lwsock32 -lsupc++ Which fails with the following error: In file included from /usr/include/w32api/windef.h:246, from /usr/include/w32api/windows.h:48, from /usr/include/FL/Fl_Preferences.H:30, from /usr/include/FL/Fl_File_Chooser.h:14, from test.cxx:5: /usr/include/w32api/winnt.h:2557: error: parse error before `+' token In file included from /usr/include/w32api/objbase.h:60, from /usr/include/w32api/ole2.h:9, from /usr/include/w32api/windows.h:111, from /usr/include/FL/Fl_Preferences.H:30, from /usr/include/FL/Fl_File_Chooser.h:14, from test.cxx:5: /usr/include/w32api/objidl.h:924: error: parse error before `+' token I was trying to determine what would be required to fix the errors in the listed headers. reid -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
Re: fltk compilation error
I am unable to determince what the error is, not knowing anything about gcc, fltk or fltk-config the following command produces a gui executable (at least for this trivial example) which prints "Hello World" to the console when Open is selected from the File menu. gcc test.cxx -lfltk -lstdc++ Please advise. Reid Thompson wrote: I'm hoping someone can help me correct the issue causing the error listed below. I've attached minimal files to reproduce the error. Thanks, reid $ fltk-config --compile test.cxx gcc -mwindows -DWIN32 -o test test.cxx -mwindows /usr/lib/libfltk.a -lole32 -luuid -lcomctl32 -lwsock32 -lsupc++ In file included from /usr/include/w32api/windef.h:246, from /usr/include/w32api/windows.h:48, from /usr/include/FL/Fl_Preferences.H:30, from /usr/include/FL/Fl_File_Chooser.h:14, from test.cxx:5: /usr/include/w32api/winnt.h:2557: error: parse error before `+' token In file included from /usr/include/w32api/objbase.h:60, from /usr/include/w32api/ole2.h:9, from /usr/include/w32api/windows.h:111, from /usr/include/FL/Fl_Preferences.H:30, from /usr/include/FL/Fl_File_Chooser.h:14, from test.cxx:5: /usr/include/w32api/objidl.h:924: error: parse error before `+' token // generated by Fast Light User Interface Designer (fluid) version 1.0104 #ifndef test_h #define test_h #include #include #include extern void Open_CB(Fl_Menu_*, void*); extern Fl_Menu_Item menu_[]; #define File (menu_+0) #define Open (menu_+1) void Open_CB(Fl_Widget *, void * userdata); #endif // generated by Fast Light User Interface Designer (fluid) version 1.0104 #include "test.h" #include #include Fl_Menu_Item menu_[] = { {"File", 0, 0, 0, 64, 0, 0, 14, 56}, {"Open", 0, (Fl_Callback*)Open_CB, (void*)(0), 0, 0, 0, 14, 56}, {0}, {0} }; int main(int argc, char **argv) { Fl_Double_Window* w; { Fl_Double_Window* o = new Fl_Double_Window(222, 100); w = o; { Fl_Menu_Bar* o = new Fl_Menu_Bar(0, 0, 240, 25); o->menu(menu_); } o->end(); } w->show(argc, argv); return Fl::run(); } void Open_CB(Fl_Widget *, void * userdata) { if ((int*)userdata == 0) { printf("Hello, World!\n"); } } # data file for the Fltk User Interface Designer (fluid) version 1.0104 header_name {.h} code_name {.cxx} decl {\#include } {} decl {\#include } {selected } Function {} {open } { Fl_Window {} {open xywh {26 59 222 100} type Double visible } { Fl_Menu_Bar {} {open xywh {0 0 240 25} } { submenu File { label File open xywh {0 0 100 20} } { menuitem Open { label Open user_data 0 callback Open_CB xywh {0 0 100 20} } } } } } Function {Open_CB(Fl_Widget *, void * userdata)} {open return_type {static void} } { code {if ((int*)userdata == 0) { printf("Hello, World!\\n"); }} {} } -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
fltk compilation error
I'm hoping someone can help me correct the issue causing the error listed below. I've attached minimal files to reproduce the error. Thanks, reid $ fltk-config --compile test.cxx gcc -mwindows -DWIN32 -o test test.cxx -mwindows /usr/lib/libfltk.a -lole32 -luuid -lcomctl32 -lwsock32 -lsupc++ In file included from /usr/include/w32api/windef.h:246, from /usr/include/w32api/windows.h:48, from /usr/include/FL/Fl_Preferences.H:30, from /usr/include/FL/Fl_File_Chooser.h:14, from test.cxx:5: /usr/include/w32api/winnt.h:2557: error: parse error before `+' token In file included from /usr/include/w32api/objbase.h:60, from /usr/include/w32api/ole2.h:9, from /usr/include/w32api/windows.h:111, from /usr/include/FL/Fl_Preferences.H:30, from /usr/include/FL/Fl_File_Chooser.h:14, from test.cxx:5: /usr/include/w32api/objidl.h:924: error: parse error before `+' token // generated by Fast Light User Interface Designer (fluid) version 1.0104 #ifndef test_h #define test_h #include #include #include extern void Open_CB(Fl_Menu_*, void*); extern Fl_Menu_Item menu_[]; #define File (menu_+0) #define Open (menu_+1) void Open_CB(Fl_Widget *, void * userdata); #endif // generated by Fast Light User Interface Designer (fluid) version 1.0104 #include "test.h" #include #include Fl_Menu_Item menu_[] = { {"File", 0, 0, 0, 64, 0, 0, 14, 56}, {"Open", 0, (Fl_Callback*)Open_CB, (void*)(0), 0, 0, 0, 14, 56}, {0}, {0} }; int main(int argc, char **argv) { Fl_Double_Window* w; { Fl_Double_Window* o = new Fl_Double_Window(222, 100); w = o; { Fl_Menu_Bar* o = new Fl_Menu_Bar(0, 0, 240, 25); o->menu(menu_); } o->end(); } w->show(argc, argv); return Fl::run(); } void Open_CB(Fl_Widget *, void * userdata) { if ((int*)userdata == 0) { printf("Hello, World!\n"); } } # data file for the Fltk User Interface Designer (fluid) version 1.0104 header_name {.h} code_name {.cxx} decl {\#include } {} decl {\#include } {selected } Function {} {open } { Fl_Window {} {open xywh {26 59 222 100} type Double visible } { Fl_Menu_Bar {} {open xywh {0 0 240 25} } { submenu File { label File open xywh {0 0 100 20} } { menuitem Open { label Open user_data 0 callback Open_CB xywh {0 0 100 20} } } } } } Function {Open_CB(Fl_Widget *, void * userdata)} {open return_type {static void} } { code {if ((int*)userdata == 0) { printf("Hello, World!\\n"); }} {} } -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/