FLTK logo

Re: [fltk.general] incomplete Circle drawn with classes from PPP

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: incomplete Circle drawn with classes from PPP Ian MacArthur Apr 25, 2021  
 
On 25 Apr 2021, at 13:44, ken williams wrote:
> 
> I just tested on a different machine, Manjaro KDE fresh install and FLTK 1.3.5 installed via the package manager and IT WORKED!
> The circle was full. I chose to install FLTK because because that's how I know to do it.
> 
> I wanted to hurry and post that it works but then I tested FLTK 1.4.x, just to be sure.
> I also installed it - but this time the circle is fragmented
> So the problem might be with installing it not with the graphics driver. 


Sorry Ken, but I’m not sure I correctly parsed all that you said: However, I think you said you tested with fltk-1.3.5 on a different machine, and everything was fine, but that you then installed fltk-1.4 and things went bad.

On that basis, you think the problem is *not* the GPU driver issue we saw before, but some issue with the act of installing fltk?

Is that a correct reading of your report?

If so, then first off I’d note that (although I, personally, do not) many people do install fltk-1.4 and seem to have no issues, so the stock installation is not, per se, problematic: however it may be in your environment, it seems.

So, when you say you installed 1.3.5, and then installed 1.4; did you un-install 1.3.5 before you installed 1.4? 
If not, you will have a corrupt installation, since the include files that present the API have the same paths and names in 1.4 as they do in 1.3 (a necessary part of the backward compatibility) but the libraries that represent the ABI will differ.
In particular, I’d assume that the distro-installed version of 1.3.5 you say you used would install the shared libs (distro packages tend to do that) whereas the fltk build of 1.4 will probably only have installed the static libs (that is the preferred fltk default.)

At link time, however, the gcc-toolchain strongly favours shared libs over static libs (unless explicitly told otherwise) since that is what the distros prefer, so there is a very real chance that you are compiling your code against include files that describe the 1.4 API/ABI combination but are then linking in shared libs that present the 1.3 ABI.

That will end badly.
Indeed, I be surprised if poorly rendered arcs were the only side corruption!


> 
> Then I come back to my original machine, uninstalled FLTK 1.4.x and planned to use it from the build folder.
> But I'm still figuring out Makefiles, because my initial method of compiling doesn't find the build files
> Even if I added these links to the VSCode's default.includePath
> 
> /run/media/repos/fltk-1.4.x/                        -> has the FL folder
> /run/media/repos/fltk-1.4.x/build/             -> has the FL folder with "abi-version.h"
> /run/media/repos/fltk-1.4.x/build/lib/       -> has the libs
> 

I don't know Manjaro, or how it sets things up, but when I see a path like "/run/media" I assume it is a path to a removable medium - that would likely not be a sensible place to store your build files.

TBH I’d expected a path like "/home/ken/my_builds/fltk” or some such thing, i.e. a folder in your own login home space.  


> VSCode's default.includePath, where I have now:
> 
>     "C_Cpp.default.includePath": [
>         "${workspaceFolder}//**",
>         "/usr/include/c++/10.2.0/**",
>         "/usr/include/",
>         "/usr/lib/",
>         "/usr/local/include/",
>         "/usr/local/lib/",
>         "/run/media/repos/fltk-1.4.x/",
>         "/run/media/repos/fltk-1.4.x/build/",
>         "/run/media/repos/fltk-1.4.x/build/lib/"
>         
> But when compiling I get the include errors...
> 
> 
> In file included from ../../Graph_lib/Graph.H:9,
>                  from ../../Graph_lib/Graph.cpp:1:
> ../../Graph_lib/fltk.H:4:10: fatal error: FL/Fl.H: No such file or directory
>     4 | #include "FL/Fl.H"
>       |          ^~~~~~~~~
> compilation terminated.
> In file included from ../../Graph_lib/Window.H:4,
>                  from ../../Graph_lib/Window.cpp:1:
> ../../Graph_lib/fltk.H:4:10: fatal error: FL/Fl.H: No such file or directory
>     4 | #include "FL/Fl.H"
>       |          ^~~~~~~~~


Does VScode generate your Makefile for you? If not, then setting the paths in VScode is unlikely to make them visible in the Makefile.

The error you are getting is because the include path passed to the compiler does not include any path that incorporates the fltk header files.

It would be interesting to see the full compiler command that your Makefile was executing when this error was flagged, to see what include paths were given to the compiler. Can you post that here?





-- 
You received this message because you are subscribed to the Google Groups "fltk.general" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fltkgeneral+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/fltkgeneral/4D3381CB-1EA1-41AE-9E55-CB87E5EB3693%40gmail.com.
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'.