Thanks Ian,

Please see detailed reply below.

In message 
<f80974b6b555c74db31726e4419db18b5cfbb...@desmdswms001.des.grplnk.net>, 
"MacArthur, Ian (Selex ES, UK)" <ian.macart...@selex-es.com> writes
>
>> 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.)
>

Thanks.  Noted.

>
>> 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!)
>

Good to hear.

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

Indeed.

>How sure are you that your setup is solid? (no offence, BTW!)
>

Not at all sure.  The problems may, however, be associated w/ issues in 
std lib implementation, and/or compiler checking.  And to repeat: there 
is only a very small number of issues; but I agree - I'd expect there to 
be 0.

(I do intend to look at these in detail sometime.)

>
>> 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"?
>

Wrt 1.3, I mean installed.  Wrt the 1.1, I built and linked with this, 
but did not install it.  This was intended to leave open the possibility 
of its not interfering with the use of the installed 1.3; and more 
importantly, I'd hoped to get a working version of the PPP examples, 
insulated from any changes coming w/ updates to the (FLTK) library.

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

Well, as per the above, this wasn't done.

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

Good to know.  (As that is what I was doing.  ;-))

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

Indeed if this happened.  ATM, I doubt that it is, though.

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

I may do.  But my "proper" installations were done from the package 
systems of Ubuntu (via GUI), and RPi (via apt-get at the command line).

>Do the samples in the fltk /test folder work OK?

Don't know, but I could try.  (Tho' w/ 1.3 only, since, as I said, I 
couldn't get the 1.1.0 (PPP) version to build.)  Plus I do know that 
I've built and run two or three simple examples of my own with the 1.3 
versions installed as above.

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

Another avenue to explore.

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

A Philips HDMI-compatible one - model number not to hand atm, sorry.

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

Well the same for me, for other apps on the RPi , and my own work 
including the FLTK experiments as above.

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

Me neither.

>However: What I actually *normally* do is run the Pi headless and
>connect to it from another machine using:
>
>  ssh -X usern...@pi.ip.addr.ess
>
>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!)
>

Tks.  I've done that before, and may do so again.  But I suspect that 
the line thickness issue is a) 'cos the samples date from a lower res 
age, and b) thickening would be easy to achieve by slight tweaking of 
the implementation of the PPP graphics shapes classes.  (Which begs the 
question: is/are there functions in FLTK that can determine at runtime 
the screen or window dimensions (in pixels) for width and height?  If 
so, the code could self-adjust the line thickness.)

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

Thanks.  That's now on the agenda.  BTW, are all these samples expected 
to work unchanged w/ 1.1 and 1.3?

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

Yes.  Unfortunately I'll not be able to spend much time on this in the 
near future.

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

I'm not surprised.

Thanks again,

Alec
-- 
Alec Ross

_______________________________________________
fltk mailing list
fltk@easysw.com
http://lists.easysw.com/mailman/listinfo/fltk

Reply via email to