Building/Using FLTK with Visual Studio 2015

929 views
Skip to first unread message

Jordan Harris

unread,
Jul 8, 2015, 8:40:34 PM7/8/15
to fltkg...@googlegroups.com
Hello everyone,

Does anyone know how I can successfully build and use FLTK on Visual Studio 2015? I can get it to build on Visual Studio 2013 by opening the .sln file from the FLTK download, but when I do that same thing in VS 2015 I get errors saying it can't find several files. Has anyone here been able to do this?

I'm using FLTK in the book Programming Principles and Practice Using C++ 2nd Ed. by Bjarne Stroustrup and I want to be able to use all of the newer (modern) C++ features discussed in the book, but VS 2013 doesn't have all of these features and VS 2015 does. I would very much appreciate any help anyone could give me.

Thanks in advance for any replies to this post.

- Jordan

Greg Ercolano

unread,
Jul 8, 2015, 8:44:03 PM7/8/15
to fltkg...@googlegroups.com
On 07/05/15 17:17, Jordan Harris wrote:
> Hello everyone,
>
> Does anyone know how I can successfully build and use FLTK on Visual Studio 2015?
> I can get it to build on Visual Studio 2013 by opening the .sln file from the
> FLTK download, but when I do that same thing in VS 2015
> *I get errors saying it can't find several files*. Has anyone here been able to do this?

I haven't tried VS 2015, but a few questions:

> What are the errors?
> What version of FLTK? (1.3.3, svn current..)

I'd suggest if using the latest compiler, use the latest FLTK
which is the tarball here:
http://www.fltk.org/software.php?VERSION=1.3.3&FILE=fltk/snapshots/fltk-1.3.x-r10779.tar.gz

If you get build errors, please include the errors here.

Martin McDonough

unread,
Jul 8, 2015, 10:03:44 PM7/8/15
to fltkg...@googlegroups.com
If you really want new C++ features, MSVC is generally not the best compiler to use in the first place.

fabien

unread,
Jul 9, 2015, 5:52:00 PM7/9/15
to fltkg...@googlegroups.com
I agree that at least for now the LLVM / with Clang compiler is for me the most advanced one (though you might find that after install C++ compiler update patches for visual studio you get fairly close; at least it was my humble experience on vs2013 after installing the latest CTP).

Please see references for LLVM amazingly up-to-date (even include some of future C++17 features)  support below:
I'll check out vs2015 soon and will come back to you,  I am assuming you use the opensource (free community) edition.

-Fab

Jordan Harris

unread,
Jul 10, 2015, 7:21:02 PM7/10/15
to fltkg...@googlegroups.com
Sorry for the delayed response. I've been busy trying to figure out how to use CLion. Anyways, I figured out that the lib files are actually getting built so I'm able to use in in VS2015 and haven't had any problems so far. It's some of the demos and test projects that are failing. Actually, I think those errors are triggered by an "internal error" in the compiler, which is caused by the fluid project. This could be because it's a pre-release version, but who knows. VS2015 comes out July 20th so we'll see!

The Visual C++ toolchain is actually getting a lot better now and the compiler is a lot more conforming than the VC++ 2013 compiler. If you're interested at all, check out this table listing the features VS2015 now has.

http://blogs.msdn.com/b/vcblog/archive/2015/06/19/c-11-14-17-features-in-vs-2015-rtm.aspx

I'm aware that the other compilers are often better than Visual C++'s, but I would rather have a really good development environment. I wouldn't leave the comfort of Visual Studio just to get a couple of language features that'll probably end up in VC++ eventually. There's just too many benefits using Visual Studio. I am trying out CMake, but that's mostly so I can try to find a good IDE to use on Linux. 

fabien

unread,
Jul 11, 2015, 10:35:50 PM7/11/15
to fltkg...@googlegroups.com
Impressive indeed how fast they provided 11/14/17 support (even if only in the current RC), it also confirms what I said with 2013 as it's really decent today provided that you are ok to use the new update 5 RC (or c++ compiler CTP patches) .


Reply all
Reply to author
Forward
0 new messages