How do I build AND install the latest FLTK version using CODE:BLOCK on Linux Mint 20?

68 vues
Accéder directement au premier message non lu

David Briscoe

non lue,
30 janv. 2022, 18:02:1430/01/2022
à fltk.general
I am new to this group and FLTK and I would like to build FLTK using the CODE:BLOCKS IDE on Linux Mint 20. Are there any step-by-step instructions anywhere? Or could someone on this group help me? I have installed Code:blocks, so I need to build it and set up the IDE to use it. I am reading "Programming Principles and Practice" 2nd Edition by Stroustrup and will need FLTK for the later examples. I'm hoping someone can help. Thank you.

Albrecht Schlosser

non lue,
30 janv. 2022, 18:19:5530/01/2022
à fltkg...@googlegroups.com
On 1/29/22 18:40 David Briscoe wrote:
> I am new to this group and FLTK

Welcome to the FLTK world!

> and I would like to build FLTK using the CODE:BLOCKS IDE on Linux Mint
> 20. Are there any step-by-step instructions anywhere? Or could someone
> on this group help me? I have installed Code:blocks, so I need to
> build it and set up the IDE to use it.

The latest version of FLTK is FLTK 1.4.0 which is still in development
and to be released soon (ca. April 2022). You can download it from
GitHub or use a weekly snapshot (see fltk.org website -> Download).

To set up Code:Blocks to build FLTK you will have to use CMake to build
the Code:Blocks IDE (project) files. I don't know Code:Blocks myself,
hence I can't tell you anything beyond how to use CMake to generate the
project files.

Since you are on Linux you can use `cmake -h' to get a list of all
possible "Generators", which are among others "CodeBlocks - Ninja" and
"CodeBlocks - Unix Makefiles". Choose one of these. If you don't know
what "Ninja" means, use "CodeBlocks - Unix Makefiles" which generates a
build you can use with 'make' or (I'm not sure, but very likely) out of
the IDE.

For more informations please see our README.CMake.txt file and if you
have more questions, please feel free to ask here again.

> I am reading "Programming Principles and Practice" 2nd Edition by
> Stroustrup and will need FLTK for the later examples. I'm hoping
> someone can help. Thank you.

This book is pretty old and uses an older version of FLTK (1.1 IIRC) but
you should be able to build with FLTK 1.4 as well. Another problem you
will encounter is that the source and support files of the book are
broken. You will need to fix the files before you will be successful to
run the exercises. I know that there are fixed files on the net but I
don't know where.

For a recent question on stackoverflow and my answer please see:
https://stackoverflow.com/questions/70819549/how-does-one-use-fltk-library-using-bjarnes-guis-header-file-in-his-book-progr/70851933#70851933

Again, if you need more help, please feel free to ask again.

Répondre à tous
Répondre à l'auteur
Transférer
0 nouveau message