abi-version.h missing when not using "make install"

216 views
Skip to first unread message

ken williams

unread,
Mar 7, 2021, 6:30:13 AM3/7/21
to fltk.general
Hi everyone!

I successfully build and run the first FLTK example from Programming Principles and Practice with the commands: 

cmake ..
make 
make install

However, before using "make install"  the FL folder did not have a file named "abi-version.h" which is required by some of the files from the book's graphical library.

I understand that "make install" moves the FL folder from the download location to the /usr/local/include and the static libraries (.a files) to /usr/local/lib ... 

So I wonder why I don't have the "abi-version.h" file when only building FLTK and not installing it. 
I downloaded FLTK 1.4 from the site and from Git and the abi file is still missing.
Or maybe I did something else wrong?

Thanks for taking the time!


Albrecht Schlosser

unread,
Mar 7, 2021, 6:58:06 AM3/7/21
to fltkg...@googlegroups.com
On 3/7/21 12:30 PM ken williams wrote:
> Hi everyone!

Hi Ken, welcome to the FLTK community!

> I successfully build and run the first FLTK example from Programming
> Principles and Practice with the commands:
>
> cmake ..
> make
> make install

Great!

Please tell us your FLTK version (1.3.x, 1.4 snapshot, Git download?),
build platform and compiler + version when you're asking for help, just
in case it matters.

Since you run 'cmake ..' and 'make' I assume you're using either
Linux/Unix or Windows with MinGW and friends.

> However, before using "make install"  the FL folder did not have a file
> named "abi-version.h" which is required by some of the files from the
> book's graphical library.

That's true, abi-version.h is generated during the build process in your
build/FL directory.

> I understand that "make install" moves the FL folder from the download
> location to the /usr/local/include and the static libraries (.a files)
> to /usr/local/lib ...

Not only that. It copies everything needed which includes abi-version.h
from the build folder to the installation folder. Did you check if
abi-version.h was in your /usr/local/include/FL/ folder after installation?

> So I wonder why I don't have the "abi-version.h" file when only building
> FLTK and not installing it.

See above. If you want to build your project directly with the FLTK
build folder (w/o installing it) you need to specify this build folder
in your compiler's "-I /path-to-fltk/build/" flag, for instance (or in
your CMake build files, see README files below).

> I downloaded FLTK 1.4 from the site and from Git and the abi file is
> still missing.

Yep, it's not in the distribution tarballs, snapshot or in the Git
repository.

> Or maybe I did something else wrong?

I suggest to read the README* files in the FLTK distribution, at least
those having something to do with your build, e.g. README.CMake.txt and
README.abi-version.txt. These names are from FLTK 1.4 (git), they may be
different in 1.3.x (w/o .txt suffix).

> Thanks for taking the time!

Welcome!

ken williams

unread,
Mar 7, 2021, 1:20:09 PM3/7/21
to fltk.general
Thank you Albrecht!

FLTK 1.4 from Git  on Manjaro Linux with GCC 10.2.0

After reading the Readme files you mentioned here's what I tried:

cmake -D OPTION_ABI_VERSION:STRING=10401 -D 'CMAKE_BUILD_TYPE=Debug' ../..                      (as I have the tree like this: fltk-1.4/build/manjaro)
make

And the result is:
- the FL folder from the fltk-1.4 folder still doesn't have abi-version.h file but has all the other .h files
- the FL folder from fltk-1.4/build/manjaro/ has only the abi-version.h file

I was expecting all the .h files to be in fltk-1.4/build/manjaro/FL or I'm getting this completely wrong?
Thanks again for your patience!




Albrecht Schlosser

unread,
Mar 7, 2021, 3:46:14 PM3/7/21
to fltkg...@googlegroups.com
On 3/7/21 7:20 PM ken williams wrote:
> Thank you Albrecht!
welcome.

> FLTK 1.4 from Git  on Manjaro Linux with GCC 10.2.0

OK.

> After reading the Readme files you mentioned here's what I tried:
>
> cmake -D OPTION_ABI_VERSION:STRING=10401 -D 'CMAKE_BUILD_TYPE=Debug'
> ../..                      (as I have the tree like this:
> fltk-1.4/build/manjaro)

Since (a) FLTK 1.4 has not yet been released and (b) the first release
will be 1.4.0 there's no need to specify an ABI version for FLTK 1.4
(yet). If at all it should be '10400' (but it doesn't matter).

> make
>
> And the result is:
> - the FL folder from the fltk-1.4 folder still doesn't have
> abi-version.h file but has all the other .h files
> - the FL folder from fltk-1.4/build/manjaro/ has only the abi-version.h file

Yep, that's correct.

As I wrote before you need to add the build folder to your compiler's
"-I ..." switches (and the source folder as well, of course). So if you
don't install you need to add two -I switches, but if you use the
installed files there's only one -I (or none if you installed in the
system standard directories).

> I was expecting all the .h files to be in fltk-1.4/build/manjaro/FL or
> I'm getting this completely wrong?

Your expectation was wrong (why would we copy all these files around?
There's no need to do that). There are the original header files in the
FLTK source folder (fltk-1.4) and the generated abi-version.h in
fltk-1.4/build/manjaro/FL, and that's it. Works fine.

> Thanks again for your patience!

No problem.

But please don't top post here, we like context and reply intermixed as
I did here (and trim irrelevant context). Thanks.
Reply all
Reply to author
Forward
0 new messages