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

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 Albrecht Schlosser 10:34 Apr 27 top right image
 
On 4/27/21 6:03 PM ken williams wrote:

 > $ cmake -D CMAKE_PREFIX_PATH=/home/me/dev/fltk-1.4 <other options>
Thank you Albrecht, *but the CMAKE_PREFIX_PATH doesn't seem to change the default, which remains /usr/local/include and /usr/local/lib:*
Here are Ian's checks:
...
I tested a couple of variants and find out that *CMAKE_INSTALL_PREFIX* *changes the default /include and /lib path*

Yes, sorry for this. I'm often mixing these variable names up. Glad you found the right one.

cmake -D CMAKE_INSTALL_PREFIX=/home/ken01/repos/fltk-1.4.0/build -D 'CMAKE_BUILD_TYPE=Debug' -D FLTK_BUILD_EXAMPLES=ON ..
with the result:

      /home/ken01/repos/fltk-1.4.0/build/bin/fltk-config --cxxflags

Ahh, okay, here's a problem. There are two fltk-config files in your BUILD folder:

  (1) /home/ken01/repos/fltk-1.4.0/build/bin/fltk-config
  (2) /home/ken01/repos/fltk-1.4.0/build/fltk-config

As you noticed the correct variable you wanted to use was CMAKE_INSTALL_PREFIX which means this is the root directory where to /install/ the built libs and include files.

File (1) is meant to be /installed/ and doesn't work when used directly from the build folder (which you did above).

File (2) however /can/ be used directly from the build folder and should issue the correct include directories and such.

You have two choices:

(a) run `make install` to install to the folder you selected with "CMAKE_INSTALL_PREFIX=/home/ken01/repos/fltk-1.4.0/build". Note: you MUST select another location as install location because that's obviously the build folder, right? You don't want to install your libs into the build folder, that would be nonsense.

(b) do not install and use fltk-config directly from the build folder, file (2) above.

After we talked about installing FLTK below your home dir I suggest to select an appropriate directory and do it, like this:

$ cmake -D CMAKE_INSTALL_PREFIX=/home/ken01/dev/fltk-1.4.0 -D 'CMAKE_BUILD_TYPE=Debug' -D FLTK_BUILD_EXAMPLES=ON ..

$ make
$ make install

The latter should install all libs and headers and more in and below /home/ken01/dev/fltk-1.4.0 and you would then find the correct fltk-config file, libs and headers in

  /home/ken01/dev/fltk-1.4.0/bin/fltk-config
  /home/ken01/dev/fltk-1.4.0/bin/fluid
  /home/ken01/dev/fltk-1.4.0/include/FL/* # all headers
  /home/ken01/dev/fltk-1.4.0/lib/*        # all libs

and some more files.

Note that you don't need 'sudo' because you install in your home dir and abi-version.h should be present in the include/FL folder.

Here's an excerpt from my installed 1.4 version:

/usr/local/fltk-1.4/
├── bin
│   ├── fltk-config
│   └── fluid
├── include
│   └── FL
│       ├── abi-version.h
│       ├── android.H
│       ├── Enumerations.H
│       ├── ...
│       ├── platform.H
│       ├── platform_types.h
│       ├── win32.H
│       └── x.H
├── lib
│   ├── libfltk.a
│   ├── libfltk_forms.a
│   ├── libfltk_gl.a
│   └── libfltk_images.a
└── share
    ├── doc
    │   └── fltk
    │       └── ...
    └── man
        ├── cat1
        │   ├── fltk-config.1
        │   └── fluid.1
        ├── cat3
        │   └── fltk.3
        ├── man1
        │   ├── fltk-config.1
        │   └── fluid.1
        └── man3
            └── fltk.3

*But there's no "include" folder in fltk/build*
So I created one, where I moved the FL folder with both abi-version.h and all the .H files I'm not sure if it's the right thing to do, but now it works, the Makefile finds the path to FL and libs.

This was /not/ the right thing, as described by me above. You should never have to copy header files manually after a build. I suggest to delete the entire build folder and try again to get a clean build and "install". Otherwise you may end up with other difficulties later.

Thank you all, I finally have something that works :)

Welcome.

--
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/b87a2ce6-8f44-dea4-06c9-558e955ada3f%40online.de.
Direct Link to Message ]
 
bottom left image   bottom right image
Previous Message ]New Message | Reply ]Next Message ]
 
 

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