On 19 Jan 2010, at 21:56, Edward Hildum 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.

I have never installed fltk from an RPM - always from the stock  
tarball; installing from the tarball is trivially easy, so I've never  
seen the point of anything else (configure ; make ; make install -  
how hard can it be?)

However - that puts things in /usr/local/include so it might be worth  
checking that the RPM does actually put things in the system  
location /usr/include (not /usr/local/include...)

> Depending on whether I set the compiler include directory to /usr/ 
> include or /usr/include/Fl, I get different storms of error messages.

Hmm, case sensitivity? That's FL not Fl - if the code came from OSX  
or Windows there's a good chance header file names have the wrong  
case and the original author never noticed - maybe?

E.g. we see a lot of - should be:

        #include <FL/Fl_Window.H>

but written as:

        #include <Fl/Fl_Window.h>

still works on Windows and (some versions of OSX) as they are only  
partly case-sensitive - but dies horribly on properly case-sensitive  
file systems.

Anyway: The correct include path should be /usr/include I would  
expect, assuming the RPM is putting this into a system location  
rather than a /usr/local location...


>
> 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.

Yup - looks right.


>
> This results in many error messages about undefined references.

Might help if you posted one or two so that we can see what it is  
telling us.

>
> With include directive -I/usr/include/Fl, I get a different set of  
> error messages regarding things defined in math.h.

Yes - don't do that.

>
> I have had some success using GNU autotools, and using /usr/include/ 
> Fl, but I have to rename the FL/math.h file to prevent it being  
> used instead of the system math.h.

That should be /usr/include (or if you built from the tarball  
yourself then /usr/local/include unless you deliberately changed the  
default prefix during configure.)

Note that the FL subdirectory is FL and not Fl of fl or...

If you explicitly add a path to /usr/include/FL then the compiler can  
not disambiguate <math.h> from FL/math.h and you get the latter  
problem you describe.



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

Reply via email to