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.

Why did you have to change configure.in?
That is not necessary, AFAIK - the stock fltk-1.3 configure already does 
the Right Thing on 64-bit OSX systems since we switched to cocoa, so far 
as I know, so no changes should be necessary there.

Or is there something here that needs resolved?
Is Manolo around to speak on this subject?


> 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.
> 
> The CMake code looks like (I added objective C++ based on some posts
> but this doesn't seem to do anything):

I don't know if the fltk cmake files are up to date in 1.3; they are not 
one of the "core" build mechanisms, so only tend to get updated in 
"stable" builds - of which there are currently none (approximately) for 1.3!

That said - do the stock fltk demos from the test folder work when built 
from configure/make?
They ought to, and if they do not then it seems likely that your base 
build is hosed - in which case it may be that your cmake is actualy fine 
and the problem is something more fundamental.

I never really got on with cmake though, so don't take my word for it!

FWIW, I get very good results, and very portable, just using makefiles 
and fltk-config, and find that simpler and much less fragile than 
<insert other build systems, including autoconf, here!>.

> Also to note, our programs have their own event loop so we call
> Fl::check periodically.  Is this something broken on the recent Apple
> port?

No, this should still work - works for me, at any rate.

> 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.  Is this something related to "Rez"?  I
> didn't see "Rez" calls when building the fltk tests.

With recent OSX variants, REZ is pretty much deprecated.
Either put your code in a bundle, or else call the <Apple system call I 
can't remember off hand that makes an executable valid at runtime>.

I believe the current fltk 1.3 (and possibly 1.1) code does the latter, 
and fltk-config for 1.3 will bundle your code for you.
Where the fltk-1.1 fltk-config used to rez the exe, the 1.3 fltk-config 
makes a minimal but valid bundle of your exe instead, since this is what 
Apple now recommend.
Works fine for me for little tests etc. (For more serious builds I have 
some code and scripts I use to build a "proper" bundle with icons and 
fonts and resource folders and so on...)

-- 
Ian



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

Reply via email to