On 5/3/20 6:16 AM Kenneth Burchfiel wrote:
> Hi everyone,
Hi Kenneth, welcome to the FLTK community.
I'm not using VS Code myself, but I looked at the docs and watched an
introductory video and it looks interesting.
Short answer: I believe it is possible. See below.
Basically VS Code is an editor, but what you will (also) need is a build
toolchain, i.e. a compiler, linker, maybe debugger, and such. If you
have worked with Dr. B's book you may already have it, but if not it
seems to me that you need to install the C++ extensions of VS Code and
follow the instructions found at the following links for ...
(a) GCC on Windows:
https://code.visualstudio.com/docs/cpp/config-mingw
which uses Mingw-w64 (according to the description) or
(b) Microsoft C++
https://code.visualstudio.com/docs/cpp/config-msvc
where you can either use a full Visual Studio or "just the C++ Build
Tools, without a full Visual Studio IDE installation".
If you have one of these build tools working you still need to create a
working build environment for FLTK. If you're new to FLTK you can either
try the stable 1.3 version (1.3.5) or start directly with 1.4
(development) from Git. The former contains VS IDE solutions which are
now deprecated. I recommend using 1.4 where you need to create the build
environment using CMake - either select "MinGW Makefiles" if you chose
(a) above or one of the "Visual Studio xxxx" projects if you chose (b).
Once you have compiled the FLTK library using the build tools you
*should* be able to edit your own code with VS Code and build it using
the MinGW and/or VS build tools. I don't know how exactly you can do it
directly from within VS Code (documentation makes me think it is
possible because they mention debugging), but that's something you'd try
yourself.
One note on Dr. B's Book: you will notice that he adds some wrappers
around FLTK library calls and maybe creates his own widgets. This code
is known to not work OOTB with FLTK (1.3/1.4) but there are informations
on the 'net that show you how to get going. Maybe you can also find
something in the history of this group.
If you have further questions, please feel free to ask here again.