> This code uses FLTK for its GUI examples.  A link is provided (
> http://www.stroustrup.com/Programming/FLTK/ ) to FLTK-1.1.9 sources, to
> build that version to be linked with the relevant example code.  In
> attempting to doing this I've experienced slight problems, and am
> seeking advice on these.

The nearest "stable" release to 1.1.9 is 1.1.10 so that might
be worth a try, too.

Note that, for statically linked code, the API for 1.3 is pretty
much "the same" as fltk-1.1, so you can (I do) use fltk-1.3 for
all my old fltk-1.1.x era code.

(The binary ABI has changed, but if you are always linking static,
as we recommend, then that should not be an issue.)


> What I tried to do was simply a build of the FLTK lib on Ubuntu 12.04,
> and on a Raspberry Pi ( http://www.raspberrypi.org/ ), running its
> current Debian wheezy os (Raspbian), and w/ their default g++, 4.6.3
> for
> both of these, IIRC.  The problems include:
> 
>     1) In building the supplied FLTK code, there is a conflict found
> with an installed file, /usr/include/dirent.h .

Ah... the glibc folk changed the way they define some of the dirent
stuff, and we patched for that, but 1.1.9 may predate the patches
(indeed, 1.1.10 may do so too - 1.3.2 should be fine!)

<aside>
FWIW I have a bunch of code running with fltk-1.3.2 on my
R-Pi (Raspbian) and it has been fine. GL performance is disappointing,
since the Xserver does not hook the GPU properly for accelerated GL
rendering, but otherwise it is fine.

GL performance "native" on the bare GPU is very fast, which makes the
Xserver behaviour all the more disappointing...!
</aside>


>      2) A few simple, compilation problems in the example code that
> were
> easy to fix.

Though perhaps unexpected?
I'd imagine those examples are well-tried, so if errors are being
encountered that might hint at some underlying problem?
How sure are you that your setup is solid? (no offence, BTW!)


> Problem 1) above was encountered with or without an (1.3) version of
> FLTK separately installed on the machine.

By "installed" do you really mean "installed" or just
"on the same machine"?

Note that the fltk-1.1 and fltk-1.3 headers DO NOT play nice together,
so you can not actually *install* both at the same time.

For my part, I have half a dozen different fltk trees on this machine,
but none are actually "installed" at all - fltk works perfectly fine right
out of the build tree, so actual installation is seldom necessary.


>  This was worked round by not
> attempting to build the (PPP) supplied source for FLTK, but just using
> the 1.3 versions available in the relevant distros.  Of course this
> left
> the GUI code being build against a lib that it was not written for.

Though with the fltk-1.1 / fltk-1.3 transition that *ought*
not to matter...



> ;-(   But there were no huge issues seen with the results, apart from
> those covered below, which might be unrelated to this change.
> 
> In running the built example code, there was a problem related to
> closing the example window.  Several of the samples have a "Next"
> button
> which worked - at least reasonably - reliably to effect closing.  But
> the window's 'x' or close on its menu seemed to result in the app's
> looping.  Is this to be expected?  I've seen references saying that
> windows under FLTK, Fl::run() does not return until all of the windows
> under user control are hidden or closed.  Is this related?


Would have to see the sample code to know.
I'm not at all familiar with the examples from the book.

It is *possible* that if you have some unhappy mix of fltk-1.1
and fltk-1.3 bits getting pulled into your build, you might
see some odd effects...

Though it seems more likely that something has just not built right...!

Grab a tarball of fltk-1.3.2 from here, and then do the:

  ./configure ; make 

dance.
Do the samples in the fltk /test folder work OK?
If not, something is hosed in your setup.
If the fltk /test samples are OK, then something is awry
in the building of the PPP examples, I guess.


> 
> Finally, on the Raspberry Pi's display, the lines are over-thin, and
> the
> colours (colors ;-)) are somewhat poor.  I _expect_ that these issues
> might be related to use of a different screen, and in any event could
> be
> addressed by slight tweaks to the example code, rather than being
> related to FLTK version changes - but if anyone has first-hand
> experience of this, I'd appreciate their comments. I haven't yet looked
> at the rendering of text.

Hmm, what display are you using with your Pi?

I have used:

- Older, 19" 4:3 aspect DVI monitor. Worked like a charm.

- 32" widescreen HDMI TV - worked once I figured out the correct
incantation to put in my boot config... See the Pi wiki for hints!

In both cases, the rendering of the widgets looked OK, and colours
were good.

I have *not* tried the composite video output. I'd assume it would
look a lot like 1980-something...

However: What I actually *normally* do is run the Pi headless and
connect to it from another machine using:

  ssh -X [email protected]

Then any X11 apps started on the Pi appear rendered by the local
Xserver. Which in most cases is my Mac, which does a really nice
job of rendering the X11 output!
(You probably know all this, but I'm adding details just in case!)


> Can anyone advise an FLTK newbie on the best way to address
> such issues in this code?

I'd try the fltk /test folder items first, if they are OK then
it suggests that the PPP examples have not built right.

If the fltk /test samples are not working, then something is borked
and we need to figure out what!

> 
> So, any advice on any of these issues would be appreciated.  And,
> ideally, I'd like to hear from people who may have tried to build the
> PPP examples on a recent Linux system.

I can't vouch for the PPP examples, but the Pi runs fltk-1.3.2 fine
on Raspbian, and I have boxes running fltk on Ubuntu-12.10 and F17
just fine too.






********************************************************************
This email and any attachments are confidential to the intended
recipient and may also be privileged. If you are not the intended
recipient please delete it from your system and notify the sender.
You should not copy it or use it for any purpose nor disclose or
distribute its contents to any other person.
********************************************************************

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

Reply via email to