Duncan Gibson wrote:
>> I'm using FLTK 1.1.9, installed as an RPM package under CentOS 5
>> (RHEL 5) and using Cmake 2.4 to build a third party application.
>> Depending on whether I set the compiler include directory to
>> /usr/include or /usr/include/Fl, I get different storms of error
>> messages.
>>
>> As I read the FLTK documentation, the proper method in C++ source
>> files is:
>>   #include <FL/Fl_xyz.H>
>>   The include directive to the compiler should be -I/usr/include,
>> or specified as /usr/include in the CMakeLists.txt file.
>> ...
>>     
>
> Yes, that's #include <FL/FL_xyz.H> and not <Fl/FL_xyz.H> !
>
> This can be hard to spot if you've already been developing on a
> case-insensitive system and then move code to a case-sensitive one.
>
> On my system there's a /usr/include/FL (both F and L in capitals)
> directory, and a /usr/include/Fl (big F, small l) symbolic link.
>
> Many people are using FLTK because of the cross-platform support,
> so it's usually a question of _when_ rather than _if_ this problem
> occurs. There's been some discussion about removing the Fl symbolic
> link in FLTK 1.3.x because it masks this sort of problem. By the
> time the user has a significant body of code to port to the other
> platform(s), it's not a trivial task to repair all #include lines
> and file names.
>
> Cheers
> Duncan
>
>   

My system also has FL and it's Fl link.  The problem I'm seeing seems 
related to the order in which the compiler searches include 
directories.  What works is searching /usr/include first, then searching 
/usr/include/Fl, and then only if I've renamed FL/math.h to something 
else (eg. Fl_math.h).  I don't know enough about Cmake to tell it what 
order the include directories should be in.  What I got from the FLTK 
docs is that I shouldn't put /usr/include/FL in the include search path 
at all.  That doesn't seem to work because the FLTK includes don't put 
the directory qualification in their includes.

Thanks,
Ted

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

Reply via email to