FLTK logo

Re: Difficulty Compiling Tutorial Examples on Linux

FLTK matrix user chat room
(using Element browser app)   FLTK gitter user chat room   GitHub FLTK Project   FLTK News RSS Feed  
  FLTK Apps      FLTK Library      Forums      Links     Login 
 All Forums  |  Back to fltk.general  ]
 
Previous Message ]New Message | Reply ]Next Message ]

Re: Difficulty Compiling Tutorial Examples on Linux Greg Ercolano Feb 14, 2006  
 
This sounds like the kind of problem one would get if you compiled
the 1.1.6 libraries with 1.0.11 headers (or vice versa), or linked
the apps dynamically, such that the 1.1.6 binaries are loading 1.0.11 dlls,
or some similar.

My own approach is to never 'install' fltk into /usr/{include,lib,bin}
or /usr/local/{include,lib,bin}, so that I can keep multiple versions of FLTK
separate, without ever having to worry about a particular FLTK version becoming
'part of the OS'.

By keeping all the fltk revs in /usr/local/src/fltk-x.x.x, and never
doing a 'make install' (ie. only doing a 'make'), then referring to that
dir by absolute path when compiling other apps, to avoid any possibility of crosstalk.

I actually do this with all third party libraries, just to keep sanity
in the context of multiple versions.

lloyd_miller-cMrlf7RSf98@public.gmane.org wrote:
I compiled fltk-1.1.6 on Slackare 10 using gcc-3.3.4 and installed it in /usr. I also have fltk-1.0.11 installed in /usr/local/bin compiled with gcc-2.95.3 for use with POSE, the old Palm emulator. Both compiled fine and coexist happily on the same system. POSE comiled, installed and runs OK.

I tried to compile this example program against fltk-1.1.6 and it failed. Firstly, there is a problem with box->labeltype(FL_SHADOW_LABEL);
I looked in the header files and couldn't find FL_SHADOW_LABEL, but I did find _FL_SHADOW_LABEL. Using that introduces a new breakage into the program. (I am not a C++ expert, I am trying to learn and decided to try fltk since it looked fairly simple.)

I commented out that line and got the program to compile using fltk-config --compile hello.cxx

When I try to run the program, a window outline appears very briefly and I get a segfault. I am using the correct fltk-config (i.e. the one for fltk-1.1.6).

If I run the program in gdb I get a window and the following:

Direct Link to Message ]
 
     
Previous Message ]New Message | Reply ]Next Message ]
 
 

Comments are owned by the poster. All other content is copyright 1998-2024 by Bill Spitzak and others. This project is hosted by The FLTK Team. Please report site problems to 'erco@seriss.com'.