Hi.  I'm developing a GLUT based model-train sim (iRunTrains) and FLTK looks 
perfect for the improved GUI it needs. Unfortunately I cannot get FLTK to build 
and was hoping for some pointers.

I'm on a Mac (OS X 10.6.8) with  xCode v3.2.6 (64 bit).  I've downloaded the 
fltk-1.3.1-source.tar.gz bundled and have been following the terminal build 
instructions.

First autoconf gave me the following error…

autom4te: m4sugar/m4sugar.m4: no such file or directory

… so I worked around that by creating a soft link:

sudo ln -s  /Developer/usr/share/autoconf /usr/share

Then ./configure gave me an error…

configure: error: C compiler cannot create executables
See `config.log' for more details.

… so my solution to that was some new search path environment variables in 
~/.profile:

export C_INCLUDE_PATH=/Developer/SDKs/MacOSX10.6.sdk/usr/include
export CPLUS_INCLUDE_PATH=/Developer/SDKs/MacOSX10.6.sdk/usr/include
export LIBRARY_PATH=/Developer/SDKs/MacOSX10.6.sdk/usr/lib

With the above paths, ./configure ran to completion.

Now "make" is failing and I'm stuck. It builds jpeg and png, but then fails on 
FL_cocoa.mm and the transcript for that is below.  I'm guessing this is search 
path related, but I don't know how/where to fix it.  Any advice is appreciated. 
 Thanks in advance!
--
Regards,
Paul at iRunTrains dot com
-----------------------------------------------------------
paul$ make
=== making jpeg ===
=== making png ===
=== making src ===
Compiling Fl_cocoa.mm...
Fl_cocoa.mm:36:21: error: pthread.h: No such file or directory
In file included from ../FL/Fl.H:30,
                 from Fl_cocoa.mm:40:
./FL/fl_utf8.h:33:19: error: stdio.h: No such file or directory
./FL/fl_utf8.h:34:20: error: string.h: No such file or directory
./FL/fl_utf8.h:35:20: error: stdlib.h: No such file or directory
./FL/fl_utf8.h:58:21: error: wchar.h: No such file or directory
./FL/fl_utf8.h:59:24: error: sys/stat.h: No such file or directory
In file included from ../FL/x.H:43,
                 from Fl_cocoa.mm:41:
./FL/mac.H:49:53: error: ApplicationServices/ApplicationServices.h: No such 
file or directory
In file included from Fl_cocoa.mm:50:
flstring.h:28:25: error: strings.h: No such file or directory
flstring.h:30:21: error: ctype.h: No such file or directory
Fl_cocoa.mm:51:20: error: unistd.h: No such file or directory
Fl_cocoa.mm:53:18: error: math.h: No such file or directory
Fl_cocoa.mm:55:24: error: Cocoa/Cocoa.h: No such file or directory
Fl_cocoa.mm:3439:19: error: dlfcn.h: No such file or directory
In file included from ../FL/Fl.H:30,
                 from Fl_cocoa.mm:40:
./FL/fl_utf8.h:207: error: expected constructor, destructor, or type conversion 
before ‘*’ token
In file included from ../FL/x.H:43,
                 from Fl_cocoa.mm:41:
./FL/mac.H:52: error: ‘CGContextRef’ does not name a type
./FL/mac.H:56: error: ISO C++ forbids declaration of ‘CGRect’ with no type
./FL/mac.H:56: error: expected ‘;’ before ‘*’ token
In file included from ../FL/x.H:43,
                 from Fl_cocoa.mm:41:
./FL/mac.H:72: error: ‘CGRect’ does not name a type
./FL/mac.H: In function ‘flCocoaRegion* XRectangleRegion(int, int, int, 
int)’:
./FL/mac.H:74: error: ‘malloc’ was not declared in this scope
./FL/mac.H:76: error: ‘struct flCocoaRegion’ has no member named ‘rects’
./FL/mac.H:76: error: ‘CGRect’ was not declared in this scope
./FL/mac.H:76: error: expected primary-expression before ‘)’ token
./FL/mac.H:76: error: expected `;' before ‘malloc’
./FL/mac.H:77: error: ‘struct flCocoaRegion’ has no member named ‘rects’
./FL/mac.H:77: error: ‘fl_cgrectmake_cocoa’ was not declared in this scope
./FL/mac.H: In function ‘void XDestroyRegion(flCocoaRegion*)’:
./FL/mac.H:82: error: ‘struct flCocoaRegion’ has no member named ‘rects’
./FL/mac.H:82: error: ‘free’ was not declared in this scope
./FL/mac.H: At global scope:
./FL/mac.H:95: error: ‘Fl_Offscreen’ does not name a type
./FL/mac.H:109: error: ‘CGContextRef’ does not name a type
./FL/mac.H:113: error: ‘CGRect’ has not been declared
./FL/mac.H:121: error: ‘WindowRef’ does not name a type
./FL/mac.H:124: error: ‘CGImageRef’ does not name a type
./FL/mac.H:127: error: ‘CGContextRef’ does not name a type
./FL/mac.H:128: error: ‘CGContextRef’ does not name a type
./FL/mac.H:129: error: ‘CGContextRef’ does not name a type
./FL/mac.H:130: error: ‘CGContextRef’ does not name a type
./FL/mac.H:131: error: ‘CGContextRef’ does not name a type
./FL/mac.H:119: error: ‘NULL’ was not declared in this scope
./FL/mac.H:159: error: ‘CGImageRef’ does not name a type
./FL/mac.H:161: error: ‘CGContextRef’ does not name a type
./FL/mac.H:168: error: ‘Fl_Bitmask’ does not name a type
./FL/mac.H:169: error: ‘Fl_Bitmask’ does not name a type
./FL/mac.H:170: warning: ‘fl_delete_bitmask’ initialized and declared 
‘extern’
./FL/mac.H:170: error: variable or field ‘fl_delete_bitmask’ declared void
./FL/mac.H:170: error: ‘Fl_Bitmask’ was not declared in this scope
./FL/mac.H:171: error: ‘Fl_Offscreen’ does not name a type
./FL/mac.H:172: error: ‘Fl_Offscreen’ has not been declared
./FL/mac.H:173: warning: ‘fl_delete_offscreen’ initialized and declared 
‘extern’
./FL/mac.H:173: error: variable or field ‘fl_delete_offscreen’ declared void
./FL/mac.H:173: error: ‘Fl_Offscreen’ was not declared in this scope
./FL/mac.H:174: warning: ‘fl_begin_offscreen’ initialized and declared 
‘extern’
./FL/mac.H:174: error: variable or field ‘fl_begin_offscreen’ declared void
./FL/mac.H:174: error: ‘Fl_Offscreen’ was not declared in this scope
In file included from ../FL/Fl_Plugin.H:25,
                 from ../FL/Fl_Device.H:29,
                 from ../FL/Fl_Paged_Device.H:26,
                 from ../FL/Fl_Printer.H:27,
                 from Fl_cocoa.mm:45:
./FL/Fl_Preferences.H:215: error: ‘FILE’ has not been declared
In file included from ../FL/Fl_Paged_Device.H:26,
                 from ../FL/Fl_Printer.H:27,
                 from Fl_cocoa.mm:45:
./FL/Fl_Device.H:216: error: ‘Fl_Offscreen’ has not been declared
./FL/Fl_Device.H:373: error: ‘Fl_Offscreen’ has not been declared
./FL/Fl_Device.H: In destructor ‘virtual 
Fl_Graphics_Driver::~Fl_Graphics_Driver()’:
./FL/Fl_Device.H:401: error: ‘free’ was not declared in this scope
./FL/Fl_Device.H: At global scope:
./FL/Fl_Device.H:436: error: ‘Fl_Offscreen’ does not name a type
./FL/Fl_Device.H:438: error: ‘Fl_Offscreen’ has not been declared
In file included from ../FL/Fl_Printer.H:27,
                 from Fl_cocoa.mm:45:
./FL/Fl_Paged_Device.H:121: error: ‘NULL’ was not declared in this scope
./FL/Fl_Paged_Device.H:121: error: ‘NULL’ was not declared in this scope
./FL/Fl_Paged_Device.H: In constructor ‘Fl_Paged_Device::Fl_Paged_Device()’:
./FL/Fl_Paged_Device.H:109: error: ‘NULL’ was not declared in this scope
In file included from Fl_cocoa.mm:45:
./FL/Fl_Printer.H: At global scope:
./FL/Fl_Printer.H:57: error: ‘PMPrintSession’ does not name a type
./FL/Fl_Printer.H:58: error: ‘PMPageFormat’ does not name a type
./FL/Fl_Printer.H:59: error: ‘PMPrintSettings’ does not name a type
./FL/Fl_Printer.H:75: error: ‘NULL’ was not declared in this scope
./FL/Fl_Printer.H:75: error: ‘NULL’ was not declared in this scope
./FL/Fl_Printer.H:152: error: ‘NULL’ was not declared in this scope
./FL/Fl_Printer.H:152: error: ‘NULL’ was not declared in this scope
In file included from Fl_cocoa.mm:50:
flstring.h:62: error: ‘size_t’ has not been declared
flstring.h:67: error: ‘size_t’ has not been declared
flstring.h:77: error: ‘size_t’ does not name a type
flstring.h:82: error: ‘size_t’ does not name a type
Fl_cocoa.mm:86: error: ‘size_t’ has not been declared
Fl_cocoa.mm:89: error: variable or field ‘cocoaMouseHandler’ declared void
Fl_cocoa.mm:89: error: ‘NSEvent’ was not declared in this scope
Fl_cocoa.mm:89: error: ‘theEvent’ was not declared in this scope
Fl_cocoa.mm:97: error: ‘CGContextRef’ does not name a type
Fl_cocoa.mm: In function ‘unsigned int mods_to_e_state(NSUInteger)’:
Fl_cocoa.mm:145: error: ‘NSCommandKeyMask’ was not declared in this scope
Fl_cocoa.mm:146: error: ‘NSAlternateKeyMask’ was not declared in this scope
Fl_cocoa.mm:147: error: ‘NSControlKeyMask’ was not declared in this scope
Fl_cocoa.mm:148: error: ‘NSShiftKeyMask’ was not declared in this scope
Fl_cocoa.mm:149: error: ‘NSAlphaShiftKeyMask’ was not declared in this scope
Fl_cocoa.mm: At global scope:
Fl_cocoa.mm:185: error: ‘pthread_t’ does not name a type
Fl_cocoa.mm:188: error: ‘pthread_mutex_t’ does not name a type
Fl_cocoa.mm:189: error: ‘fd_set’ does not name a type
Fl_cocoa.mm:226: error: ‘fd_set’ does not name a type
Fl_cocoa.mm:231: error: ‘fd_set’ has not been declared
Fl_cocoa.mm:231: error: ‘fd_set’ has not been declared
Fl_cocoa.mm:231: error: ‘fd_set’ has not been declared
Fl_cocoa.mm:232: error: ‘fd_set’ has not been declared
Fl_cocoa.mm:232: error: ‘fd_set’ has not been declared
Fl_cocoa.mm:232: error: ‘fd_set’ has not been declared
Fl_cocoa.mm: In constructor ‘DataReady::DataReady()’:
Fl_cocoa.mm:199: error: ‘tid’ was not declared in this scope
Fl_cocoa.mm:201: error: ‘_datalock’ was not declared in this scope
Fl_cocoa.mm:201: error: ‘NULL’ was not declared in this scope
Fl_cocoa.mm:201: error: ‘pthread_mutex_init’ was not declared in this scope
Fl_cocoa.mm:202: error: ‘_fdsets’ was not declared in this scope
Fl_cocoa.mm:202: error: ‘FD_ZERO’ was not declared in this scope
Fl_cocoa.mm: In destructor ‘DataReady::~DataReady()’:
Fl_cocoa.mm:209: error: ‘NULL’ was not declared in this scope
Fl_cocoa.mm:210: error: ‘free’ was not declared in this scope
Fl_cocoa.mm: In member function ‘void DataReady::DataLock()’:
Fl_cocoa.mm:219: error: ‘_datalock’ was not declared in this scope
Fl_cocoa.mm:219: error: ‘pthread_mutex_lock’ was not declared in this scope
Fl_cocoa.mm: In member function ‘void DataReady::DataUnlock()’:
Fl_cocoa.mm:220: error: ‘_datalock’ was not declared in this scope
Fl_cocoa.mm:220: error: ‘pthread_mutex_unlock’ was not declared in this 
scope
Fl_cocoa.mm: In member function ‘int DataReady::IsThreadRunning()’:
Fl_cocoa.mm:223: error: ‘tid’ was not declared in this scope
Fl_cocoa.mm: In member function ‘void DataReady::AddFD(int, int, void 
(*)(int, void*), void*)’:
Fl_cocoa.mm:249: error: ‘malloc’ was not declared in this scope
Fl_cocoa.mm:250: error: ‘realloc’ was not declared in this scope
Fl_cocoa.mm:259: error: ‘_fdsets’ was not declared in this scope
Fl_cocoa.mm:259: error: ‘FD_SET’ was not declared in this scope
Fl_cocoa.mm:260: error: ‘_fdsets’ was not declared in this scope
Fl_cocoa.mm:260: error: ‘FD_SET’ was not declared in this scope
Fl_cocoa.mm:261: error: ‘_fdsets’ was not declared in this scope
Fl_cocoa.mm:261: error: ‘FD_SET’ was not declared in this scope
Fl_cocoa.mm: In member function ‘void DataReady::RemoveFD(int, int)’:
Fl_cocoa.mm:286: error: ‘_fdsets’ was not declared in this scope
Fl_cocoa.mm:286: error: ‘FD_CLR’ was not declared in this scope
Fl_cocoa.mm:287: error: ‘_fdsets’ was not declared in this scope
Fl_cocoa.mm:287: error: ‘FD_CLR’ was not declared in this scope
Fl_cocoa.mm:288: error: ‘_fdsets’ was not declared in this scope
Fl_cocoa.mm:288: error: ‘FD_CLR’ was not declared in this scope
Fl_cocoa.mm: At global scope:
Fl_cocoa.mm:293: error: ‘int DataReady::CheckData’ is not a static member 
of ‘class DataReady’
Fl_cocoa.mm:293: error: ‘fd_set’ was not declared in this scope
Fl_cocoa.mm:293: error: ‘r’ was not declared in this scope
Fl_cocoa.mm:293: error: ‘fd_set’ was not declared in this scope
Fl_cocoa.mm:293: error: ‘w’ was not declared in this scope
Fl_cocoa.mm:293: error: ‘fd_set’ was not declared in this scope
Fl_cocoa.mm:293: error: ‘x’ was not declared in this scope
Fl_cocoa.mm:293: error: initializer expression list treated as compound 
expression
Fl_cocoa.mm:294: error: expected ‘,’ or ‘;’ before ‘{’ token
Fl_cocoa.mm:86: warning: ‘void convert_crlf(char*, int)’ declared 
‘static’ but never defined
Fl_cocoa.mm:87: warning: ‘void createAppleMenu()’ declared ‘static’ but 
never defined
Fl_cocoa.mm:88: warning: ‘flCocoaRegion* MacRegionMinusRect(flCocoaRegion*, 
int, int, int, int)’ declared ‘static’ but never defined
Fl_cocoa.mm:90: warning: ‘int calc_mac_os_version()’ declared ‘static’ 
but never defined
Fl_cocoa.mm:109: warning: ‘got_events’ defined but not used
Fl_cocoa.mm:110: warning: ‘resize_from_system’ defined but not used
Fl_cocoa.mm:111: warning: ‘main_screen_height’ defined but not used
Fl_cocoa.mm:137: warning: ‘macKeyLookUp’ defined but not used
Fl_cocoa.mm:142: warning: ‘unsigned int mods_to_e_state(NSUInteger)’ 
defined but not used
make[1]: *** [Fl_cocoa.o] Error 1
make: *** [all] Error 1

_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk

Reply via email to