On 09.07.2015 02:31 Jordan Harris wrote:
> Does anyone know how to easily build FLTK using CLion, which uses the
> CMake build system.
I don't know of any FLTK dev using CLion, but recently there was a post
about it. I can't tell how to use CLion with FLTK, but maybe it's
straightforward because FLTK has CMake build files you may use. OTOH
this might need some deeper knowledge if it doesn't work immediately.
> I'm a Visual Studio guy and I've only used it, but I
> really want to give CLion a try and using FLTK with it would be a great
> way to try it.
IIRC you can use CLion only with certain compilers (toolchains), and I
don't know if one comes bundled with CLion. Again, IIRC, I believe that
you can use gnu compilers under Windows, and that would probably be
MinGW or Cygwin. Hence it is likely a good idea to try to build FLTK
with a supported development environment first, and we (the FLTK team)
recommend using MinGW. If you need help we can support you pretty well
with questions about MinGW and FLTK. See more below.
> I would really appreciate any help you guys could give me. I'm not an
> experienced programmer at all so there's a lot I don't know about
> things, like CMake for example.
Note that CMake is a system to configure the build system you want to
use, not a build system of its own. Hence you basically need a compiler
and maybe make etc., or you can even create Visual Studio IDE files with
CMake - but that is something you probably don't want to do, according
to your question.
> I'm actually using FLTK because I'm
> reading the book Programming Principles and Practice Using C++ 2nd Ed.
> Anyways, thanks in advance for any help anyone can give me.
Okay, then you should also know that FLTK 1.3.x is the only supported
FLTK version right now. Don't try anything else.
> I might end up needing help with figuring out how to actually use FLTK
> with CLion, but I need to figure out how to build it first.
I'd recommend to install MinGW including the MSYS build tools and use
standard autoconf + make to see how that works. If you install the FLTK
tarball somewhere you can just run 'make' to build FLTK. Everything
should work OOTB.
Once this is working you can try to import the FLTK CMake files into
CLion and try if this works as well.
But maybe I'm talking nonsense and CLion has all you need and you don't
need to install MinGW separately...