Anton Deguet wrote:
> I am using fltk 1.3.x-r7677. I wanted to try FLTK on Mac OS (10.6) compiled
> for x86_64. I used "configure" (not CMake) to compile fltk itself with a
> modified configure.in (replaced i386 by x86_64, a temporary hack). fltk
> compiles and the tests run well as far as I can tell.
As Ian wrote already, this shouldn't be necessary.
> I then tried to compile my own code against fltk/fluid. We use CMake for the
> build process and pointing at the right header files and libraries I was able
> to compile without any issue. The problem is that the code doesn't seem to
> run, i.e. I have a blank screen with a spinning beach ball. I tried another
> example I wrote with an OpenGL window and the OpenGL part gets refreshed but
> the fltk widgets are still blank.
How did you manage "pointing at the right header files..." ?
> The CMake code looks like (I added objective C++ based on some posts but this
> doesn't seem to do anything):
You're right, adding objective C++ to your build is moot, unless you're
using Cocoa functions in your code. You can safely remove it.
> FLTK_WRAP_UI(multiTaskTutorialExample1 displayUI.fl)
>
> ADD_EXECUTABLE(multiTaskTutorialExample1
> sineTask.cpp
> displayTask.cpp
> main.cpp
> ${multiTaskTutorialExample1_FLTK_UI_SRCS}
> )
If this *all* your fltk-related CMake setup? [see below for more...]
> if(APPLE)
> set_source_files_properties(${multiTaskTutorialExample1_FLTK_UI_SRCS}
> main.cpp
> displayTask.cpp
> PROPERTIES COMPILE_FLAGS "-x objective-c++")
>
> endif(APPLE)
As noted above, this can be removed.
> Any clue? I compared the compilation and link options between the tests
> provided with fltk and the makefiles generated by CMake but I can't find
> anything obvious.
CMake is not fully supported by the FLTK team, because nobody uses it
and we don't know much about it. However, I tried to manage to keep it
up-to-date with the help of someone who wrote the *new* CMake support
files for FLTK 1.3, thus it ought to work ... somehow.
That said, you should keep in mind:
(1) don't use "in source" builds with CMake, because it writes files
to the source tree that can interfere with other builds.
(2) you should read the files README.CMake_build and README.CMake_use
in the FLTK root directory to see how CMake should be used with
FLTK 1.3. This has changed from FLTK 1.1, especially the way to find
the FLTK package now needs the NO_MODULE keyword. I didn't see the
find_package statement in your code above, though...
(3) you should build FLTK 1.3 with CMake and install it properly to
get all the benefits like the find_package() statement working (AFAIK).
If you tweak your CMake/FLTK build manually, you're on your own.
That said, the symptoms you described look as if you managed to mix
old FLTK 1.1 and new FLTK 1.3 headers and/or libs. If you installed
FLTK 1.1 previously in a standard location, you should remove it
before installing FLTK 1.3, because they are not compatible. The
standard make builds and the resulting fltk-config can work with
multiple (not installed) FLTK versions in their build directories,
but I don't know how to do this with CMake.
Albrecht
_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk