The Latest FLTK w/ The Latest Visual Studio, Tutorial Needed

90 views
Skip to first unread message

Joe C

unread,
Nov 13, 2018, 8:21:31 PM11/13/18
to fltk.general
I'm new to programming and have been going through C++ Programming Principles and Practices.  Ch 12 states that the graphics require FLTK....and that's it.  Nothing else other than you need it.

So I follow the link (http://www.fltk.org) and then what?  Front page is not designed with new comers in mind.  I click on Downloads at the top since I figured I'd have to download a library.  After all, the book makes use of header files (eg. Window.h).  I download the one at the top (fltk-1.3.4-2-source.tar.gz).  Unzip and what is this?  What do I do with this?  Seven ReadMe files?

Looks like README.MSWindows is the one I need.  I'm using VS 2017 and the read me says, for 2010 or later, go download something from http://www.microsoft.com/express/Downloads/.

"We are sorry, the page you requested cannot be found."

Now what?  I looked in the first read me and it mentions building it using the Visual C++ project files but to first read "ide/README.ide"

What's with the extention ".ide"?  Why isn't it a text doc or a word doc?

This all seems rather complicated (advanced?) of a process to get it to work for a beginner's course book?


Lasse....@idi.ntnu.no

unread,
Nov 14, 2018, 8:36:30 AM11/14/18
to fltk.general
Hi Joe,
I have been working the last weeks on some course material that can be of interest to you. I am teaching C++ to a class with 800 students, starting 7. January 2019. We have already prepared the slides (in English) for the first 3-4 lectures, and is continuing. My approach is FLTK/PPP from week 1, stuff from chapter 12 is introduced the first day! --- our way of using the PPP book is maybe a bit radical, but I think graphics is highly motivating for the students.

I am using MS Visual Studio 2017 Community edition (free), and our approach is to give our students a ZIP-file with all set up. Unzip the file, and replace main.cpp with your own files, and you have graphics.

I will send you a private e-mail with link to the preliminary slides, and give you access 10-12 examples programs following the slides. We are checking the ZIP-file set up now, and I will give you that during the day.

It would be nice for us to have you as a test-driver for our course material. I could mention that we will skip (cover lightly) chapter 6 and 7, and instead use stuff from chap. 12-16 earlier in the course.

Best regards from Norway
Lasse Natvig
Professor NTNU

Francesco Piscani

unread,
Nov 14, 2018, 2:48:20 PM11/14/18
to fltk.general
Hello Professor,

Thank you for the input. 
First of all I would like to add that the textbook mentioned, is a great book, and I really appreciate the fact that Bjarne chose FLTK, and not many of the other alternatives.  Having said that, it's important to note as well, that the whole book is geared to students using Visual Studio and MS tools. There are many students out there, myself included, that are using Linux, or Apple, and the way the book is written is geared to microsoft tools, not taking into consideration on how to compile outside of the MS ecosystem.  In order to follow along the examples outside of a MS environment can sometimes become cumbersome and frankly frustrating.  We need to include CMake, or Makefiles that give new students the tools to follow along and not be penalized just because they are using another operating system.

Francesco Piscani

unread,
Nov 14, 2018, 2:49:06 PM11/14/18
to fltkg...@googlegroups.com

Greg Ercolano

unread,
Nov 14, 2018, 4:17:16 PM11/14/18
to fltkg...@googlegroups.com
On 11/14/18 10:26 AM, Francesco Piscani wrote:
> said that, it's important to note as well, that the whole book is geared to students using Visual Studio and MS tools.
> There are many students out there, myself included, that are using Linux, or Apple, and the way the book is written
> is geared to microsoft tools, not taking into consideration on how to compile outside of the MS ecosystem.

Using FLTK with Linux is easier.

If you're using 1.3.x and have downloaded the fltk-1.3.4-2-source.tar.gz file
to e.g. the /tmp directory, then to extract and build it, you can use these
commands as root:

mkdir -p /usr/local/src
cd /usr/local/src/
tar xvfz /tmp/fltk-1.3.4-2-source.tar.gz
cd fltk-1.3.4rc2
./configure
make

..that should build the library and test programs.

Once constructed, you should be able to build simple programs
e.g. in your home directory with:

$ cd ~ <-- change to your home directory, logged in as you
$ cat hello.cxx <-- view a sample hello.cxx file you create

#include <FL/Fl.H>
#include <FL/Fl_Window.H>
#include <FL/Fl_Box.H>
int main(int argc, char **argv) {
Fl_Window *window = new Fl_Window(340,180);
Fl_Box *box = new Fl_Box(20,40,300,100,"Hello, World!");
box->box(FL_UP_BOX);
box->labelfont(FL_BOLD+FL_ITALIC);
box->labelsize(36);
box->labeltype(FL_SHADOW_LABEL);
window->end();
window->show(argc, argv);
return Fl::run();
}

$ /usr/local/src/fltk-1.3.4rc2/fltk-config --compile hello.cxx <-- compiles the program with the needed libraries

..and that should compile your program which you should then
be able to run with e.g.

$ ./hello

..which should bring up a window saying "hello world".

If you have trouble with any of that, follow up with the error output.
From there you should be able to easily build other programs.

I'm assuming you understand the unix prompt enough to follow the above;
the 'hello.cxx' file is something you create in a text editor e.g. vi,
the above 'cat' command just shows a simple 'hello world' example.

Lasse....@idi.ntnu.no

unread,
Nov 14, 2018, 4:22:14 PM11/14/18
to fltk.general
Hello Fransesco,

thank you for the interest. I agree with you that also Mac and Linux platforms are the choice for many. One of our main reasons for chosing the PPP book with FLTK is that FLTK is cross-platform. In our class there is approx. 500 students with Win-PC, 250 with mac and 50 with some Linux-box. We will provide help for PC and mac users first, our Linux-students use to be a bit more advanced, they fix things themself, but we might provide a suggested setup also for them, when we find time for it. I do not agree that the PPP-book is  geared to Visual Studio or MS. The C++ code is portable. Yes, there is an (outdated) appendix on how to install for MS-VS, and you can see that the author use windows from the screenshots, but I do not think the book has any lower value for Mac or Linux-users.
Best regards, Lasse

Francesco Piscani

unread,
Nov 14, 2018, 10:00:43 PM11/14/18
to fltk.general
Hello Greg and Lasse,

Thank you for the information.

Greg, I wanted to clarify a point regarding my take on Bjarne's book and the way he handles the GUI chapters of his book.  I know FLTK does a pretty good job, through the community, googlegroups, and website like yours to make it really easy to navigate in a Linux environment. I have never had any issues running straight FLTK files in Linux.  What I said,  is that this is not the case if you are a beginner and taking your first C++ class and using Bjarne's book.  Everything is fine until you hit the GUI chapters.  All of the sudden you have helper files for Windows users that make the compilation easier for them to understand, but these helper files are really incompatible and not helpful, if you are using a Linux box or an Apple Linux fork. I have included a screenshot of some of these helper files.  When you first encounter these you will try to make them work in Linux, but sadly you will find out that they are not meant to be used in a Linux ecosystem, and when you try to compile them in Linux, you will be become a very confused beginner student.

Screenshot from 2018-11-14 21-39-55.png

Examples of these are the Graph.cpp, GUI.cpp, and std_lib_facilities.h files shown here in the screenshot.  The typical beginner C++ student as soon as they hit this chapter wastes half of his/her time trying to make these work in Linux, or after a few days become frustrated enough give up, and take the easy route and use a MS box and install Visual Studio. This has nothing to do with FLTK, but using FLTK with Bjarne's book.  Having said that, I am still grateful that not only he wrote that book, but that he picked FLTK to illustrate the examples instead of using one of the other many alternatives. 

Francesco Piscani

unread,
Nov 14, 2018, 10:48:04 PM11/14/18
to fltkg...@googlegroups.com
Hello Greg and Lasse,

Thank you for the information.

Greg, I wanted to clarify a point regarding my take on Bjarne's book and the way he handles the GUI chapters of his book.  I know FLTK does a pretty good job, through the community, googlegroups, and website like yours to make it really easy to navigate in a Linux environment. I have never had any issues running straight FLTK files in Linux.  What I said,  is that this is not the case if you are a beginner and taking your first C++ class and using Bjarne's book.  Everything is fine until you hit the GUI chapters.  All of the sudden you have helper files for Windows users that make the compilation easier for them to understand, but these helper files are really incompatible and not helpful, if you are using a Linux box or an Apple Linux fork. I have included a screenshot of some of these helper files.  When you first encounter these you will try to make them work in Linux, but sadly you will find out that they are not meant to be used in a Linux ecosystem, and when you try to compile them in Linux, you will be become a very confused beginner student.
Screenshot from 2018-11-14 21-39-55.png

Examples of these are the Graph.cpp, GUI.cpp, and std_lib_facilities.h files.  The typical beginner C++ student as soon as they hit this chapter wastes half of his/her time trying to make these work in Linux, or after a few days become frustrated enough give up, and take the easy route and use a MS box and install Visual Studio. This has nothing to do with FLTK, but using FLTK with Bjarne's book.  Having said that, I am still grateful that not only he wrote that book, but that he picked FLTK to illustrate the examples instead of using one of the other many alternatives. 

--
You received this message because you are subscribed to the Google Groups "fltk.general" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fltkgeneral...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Edzard Egberts

unread,
Nov 15, 2018, 2:33:54 AM11/15/18
to 'ed' via fltk.general
Hello there,

> note as well, that the whole book is geared to students using Visual
> Studio and MS tools.

I don't know the current "C++ programming" edition, but I know the "MS
tools problem". Microsoft tries to hide the basic operations from the
user, to restrict the user to MS tools by commercial interests. Using
the tools, all seems to be easy and works like magic, until you hit the
first bug. Then the Microsoft way is "work around", wait and pay for the
next update, the OpenSource way is to fix it.

From my point of view the C++ book seems to miss the part "how to use
external libraries" and "basic process of building a program". FLTK is
just another library (please don't missunderstand that, anyway it's
great ;o) and you don't complain about a FLTK problem, but you are
missing basic understanding of programming (that's okay, you told to be
new).

The steps of configuration, compiling and linking are not MS, Mac or
Linux, they are basic. MS hides them, but behind the GUI it's all the
same. So you need to learn or teach, what compiling is, what static and
dynamic libraries are, what linking is and how it works (e.g. things
like 'extern "C"', name mangling or dynamic libraries). There are little
differences between MS-Windows and Linux, like extension of dynamic
libraries (.dll/.so), but as soon as someone knows the basic
requirements, he *really* can work cross platform and use every kind of
IDE (Visual Studio, Eclipse-CDT, Code::Blocks and so on) to build
programs. There is no real difference from basic step by step (write
text, compile it, link it, have fun) to "magic" gui use, the latter just
hides the steps and provides more special editors (please don't tell
this to an emacs user ;o).

Fabien Costantini

unread,
Nov 15, 2018, 8:16:30 AM11/15/18
to fltkg...@googlegroups.com
Please don't start a platform war, I use MS toolsuites everyday for professional medical devices development, and it works great overall.
I also use various mac osx and linux tool suites for opensource activities almost every weekend, and I can tell you that, very unfortunately ; 
very often I'll decide to do debugging in an ms devenv rather than using, very buggy OSS tools such as eclipse.

I was burned many times and wasted a lot of time with these 'free' tools, even though I still defend and contribute to a lot to opensource software today.
Note that I would not use Xcode either for anything, when having a choice.



Peace,
-Fab



From: Edzard Egberts <ed...@tantec.de>
To: 'ed' via fltk.general <fltkg...@googlegroups.com>
Sent: Thursday, November 15, 2018 1:33 AM
Subject: Re: [fltk.general] Re: The Latest FLTK w/ The Latest Visual Studio,Tutorial Needed


--
You received this message because you are subscribed to the Google Groups "fltk.general" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fltkgeneral+unsub...@googlegroups.com.

Edzard Egberts

unread,
Nov 15, 2018, 9:11:47 AM11/15/18
to 'ed' via fltk.general

> Please don't start a platform war, I use MS toolsuites everyday for
> professional medical devices development, and it works great overall.

I use the Eclipse CDT every day for cross platform Linux and MS-Windows
development. But that just means, that the code can be compiled on both
systems, not that I need the Eclipse IDE to do so. It doesn't matter,
which tool you use, when you know, what the tool makes.

I would like to know, how much did you pay for the MS toolsuite and can
you do your development without it? When you payed a lot and can't miss
the suite, you comply with Microsofts business model. AFAIK Mr. Nadella
makes some changes, but also the "free" versions are burdened with
licences, that can be avoided when knowing the basics.

People should know, that they don't need a toolsuite, but only some
basic tools to build software. Then it doesn't matter, which operating
system or toolssuite they use.

> very often I'll decide to do debugging in an ms devenv rather than
> using, very buggy OSS tools such as eclipse.

LOL, who of us starts a platform war - the Eclipse CDT is *not* buggy,
really not! I'm using it for years and I'm happy with it.

Fabien Costantini

unread,
Nov 15, 2018, 9:24:49 AM11/15/18
to fltkg...@googlegroups.com
>I would like to know, how much did you pay for the MS toolsuite and can 
>you do your development without it? When you payed a lot and can't miss 
>the suite, you comply with Microsofts business model. 

At home, I use visual studio community edition for open source development, and it costs me exactly * 0$ *
BTW, You can even sell software with community edition provided that you don't earn more than a very reasonable limit of money per year with the software you develop with visual studio.

>It doesn't matter, which tool you use, when you know, what the tool makes.
At a certain point of productivity, it does matter. Did you ever looked at the .Net Framework architecture, did you ever produce code with C sharp ?
Because if you did, you would probably understand that it does matter to choose the proper tool.

-Fab



From: Edzard Egberts <ed...@tantec.de>
To: 'ed' via fltk.general <fltkg...@googlegroups.com>
Sent: Thursday, November 15, 2018 8:11 AM

Subject: Re: [fltk.general] Re: The Latest FLTK w/ The Latest VisualStudio,Tutorial Needed

Edzard Egberts

unread,
Nov 15, 2018, 9:46:18 AM11/15/18
to 'ed' via fltk.general
>>I would like to know, how much did you pay for the MS toolsuite and can
>>you do your development without it? When you payed a lot and can't miss
>>the suite, you comply with Microsofts business model.
>
> At home, I use visual studio community edition for open source
> development, and it costs me exactly * 0$ *
> BTW, You can even sell software with community edition provided that you
> don't earn more than a very reasonable limit of money per year with the
> software you develop with visual studio.

Yes, I don't want my boss to get problems in case, that he makes more
money with my software as Microsoft allows. In fact I don't want anyone
to have right on my hard work! ;o)

> Did you ever looked
> at the .Net Framework architecture, did you ever produce code with C sharp ?

I'm sorry, this newsgroup deals with a C++-Library and not with a blown
up Java clone. People use FLTK to avoid things like .NET, so you are off
topic.

Fabien Costantini

unread,
Nov 15, 2018, 10:00:54 AM11/15/18
to fltkg...@googlegroups.com
>Yes, I don't want my boss to get problems in case, that he makes more 
>money with my software as Microsoft allows. In fact I don't want anyone 
>to have right on my hard work! ;o)
But that's the point: you can decide to pay when you get successful and wealthy (btw a ridiculously low amount of money compared to what you earned thanks to their tools and your hard work) and keep selling your software if you are successful, and the idea is not only ms won't get you into problems ; but I can promise you'd be glad to pay (we are talking about many hundred thousands of regular income revenue here) ;-)
I was there, and never regretted to pay for software that gets the company I work for a significant income.
 
>I'm sorry, this newsgroup deals with a C++-Library and not with a blown 
>up Java clone. People use FLTK to avoid things like .NET, so you are off 
>topic.
IMO , you are misunderstanding technology and topic: we are talking about toolchains here, and adding to the argumentation that the ms toolchain is just so much more than just a c++ toolchain is certainly not off topic. I'm sure that many people here are using python (I do and contributed in python as well), and visual studio it is also great for that.

-Fab



From: Edzard Egberts <ed...@tantec.de>
To: 'ed' via fltk.general <fltkg...@googlegroups.com>
Sent: Thursday, November 15, 2018 8:46 AM

Subject: Re: [fltk.general] Re: The Latest FLTK w/ The LatestVisualStudio,Tutorial Needed

Edzard Egberts

unread,
Nov 15, 2018, 10:45:13 AM11/15/18
to 'ed' via fltk.general
> IMO , you are misunderstanding technology and topic: we are talking
> about toolchains here, and adding to the argumentation that the ms
> toolchain is just so much more than just a c++ toolchain is certainly
> not off topic.

My topic was, how to use FLTK library on different platforms and without
a dependency from a special software suite. My point was, that someone,
who knows the basics, does not need a special platform or toolkit, but
is able use all of them.

Thank you to mention "toolchain", in fact I wanted to point out, that
all the software suites use a basic and well defined toolchain, that is
similar for all platforms.

Fabien Costantini

unread,
Nov 15, 2018, 11:10:47 AM11/15/18
to fltkg...@googlegroups.com
>My topic was, how to use FLTK library on different platforms and without 
>a dependency from a special software suite. My point was, that someone, 
It was not what I reacted on ,as long as you don't criticize, other toolchain (that don't all use gcc or llvm) and companies like you just did when talking about ms, we are good. 

I am more concerned about of beginners reading us that you to understand my points, as it is more important for them to not be naive and get the wrong impression without any solid fundation about commercial (or not) development tools or frameworks. 

-Fab



From: Edzard Egberts <ed...@tantec.de>
To: 'ed' via fltk.general <fltkg...@googlegroups.com>
Sent: Thursday, November 15, 2018 9:45 AM

Subject: Re: [fltk.general] Re: The Latest FLTK w/ The LatestVisualStudio,TutorialNeeded

Brock Savage

unread,
Feb 3, 2019, 4:15:59 AM2/3/19
to fltk.general


On Tuesday, November 13, 2018 at 5:21:31 PM UTC-8, Joe C wrote:
I'm new to programming and have been going through C++ Programming Principles and Practices.  Ch 12 states that the graphics require FLTK....and that's it.  Nothing else other than you need it.


Just to let you know, there is an explanation of how to download, install, and configure FLTK with Visual Studio in Appendix D of Stroustrup's book (2nd Edition).   I haven't tried it, so I can't vouch for how complete or accurate it is, but at least there is a better explanation than in Ch 12.

Maxie Schmidt

unread,
Feb 3, 2019, 5:19:03 AM2/3/19
to fltkg...@googlegroups.com
I think this is actually a very on point topic. I recently enough found myself updating and bringing to life some legacy academic software which used the fltk toolkit for windowing et. al. We had the priority of supporting Linux and Mac environments. I had a particularly unpleasant time coping with the latter as a build platform without using stock Apple toolkits. If you come up with some sane build instructions for getting fltk to work on Windows that doesn't require too much mucking with, I'd really like to read more about it.

Maxie

--
You received this message because you are subscribed to the Google Groups "fltk.general" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fltkgeneral...@googlegroups.com.

Brock Savage

unread,
Feb 3, 2019, 6:14:58 PM2/3/19
to fltk.general


Here's what looks like a very complete tutorial on using FLTK 1.3.4 with Visual Studio 2017:

Francesco Piscani

unread,
Feb 4, 2019, 10:51:50 AM2/4/19
to fltkg...@googlegroups.com
Hello Joe C,

My thoughts indeed.  It gets even more surreal when you try to follow along from a Linux machine, and you try to do without the windows helper files, and try do your own compilation yourself. I mentioned this insanity in an old post. It would be better if he just compiles cleanly without the Windows.h helper files, all it does, is confuse people that use Linux or a Mac.

On Sun, Feb 3, 2019 at 6:14 PM Brock Savage <brock...@gmail.com> wrote:


Here's what looks like a very complete tutorial on using FLTK 1.3.4 with Visual Studio 2017:

--

Ian MacArthur

unread,
Feb 4, 2019, 5:05:53 PM2/4/19
to fltkg...@googlegroups.com


> On 3 Feb 2019, at 10:18, Maxie Schmidt wrote:
>
> I think this is actually a very on point topic. I recently enough found myself updating and bringing to life some legacy academic software which used the fltk toolkit for windowing et. al. We had the priority of supporting Linux and Mac environments. I had a particularly unpleasant time coping with the latter as a build platform without using stock Apple toolkits. If you come up with some sane build instructions for getting fltk to work on Windows that doesn't require too much mucking with, I'd really like to read more about it.
>



This comes up form time to time, and I need to ask; can you elucidate what the problems are, can you identify where the difficulties arise?

I’ve been using fltk for... well, I don’t really know, but since 1.0.x time so could be 20 years or more... Anyway, the point is, I am not able to discern what the difficulties are, as I’ve been living with this for so long. For me, it all Just Works.
I’d speculate that all the devs are in a similar position; we literally do not see where the difficulties might lie.

So, we need folks who are coming to this afresh to discern what the problems with building, installing, using, fltk are, as we can no longer see them!


For VS users, 1.3.x still ships with IDE files. These worked fine with VS 2017 Community Ed., last time I checked, so presumably that is not the problem?

For “other” Windows users (and this is usually what I do myself) I just use the Msys shell and run the stock autoconf / configure / make sequence, as one would for any lib., and that also just works.

For *nix systems, the autoconf / configure / make sequence ought to Just Work, if you have the dev tools installed.

For OSX/MacOS, there are Xcode IDE files, and again the autoconf / configure / make sequence typically works (though it does appear that Apple are contriving to break that in more recent releases!)


For 1.4.x, apart from the autoconf files, we also have cmake files that work pretty well.


So... I have a sense that I am addressing the wrong question - but then the bonus question becomes; what question should I have been addressing?



Francesco Piscani

unread,
Feb 4, 2019, 11:49:11 PM2/4/19
to fltkg...@googlegroups.com
In my opinion there is nothing that fltk is doing or not doing. For me it has nothing to do with FLTK. The point of contention for me is the way that Bjarne's introductory book introduces fltk to beginners. One assumption made by the author is that everybody that follows the book is using VS.  Even though most of them, I assume that they are, a lot of other people are using a Mac or linux. When a beginner using a Mac or your *nix flavor of the day, tries to compile the examples of the book in addition to some windows helper files created by the author but meant for a VS user, the beginner becomes confused and on the brink of despair, some of them unfairly place the blame on FLTK and try for an alternative library. In a perfect world, the authors of Bjarne's book would create a compilation process for windows using the helper files, and another one using CMake, autotools, make, or just plain terminal commands. This might help beginners to concentrate on learning the library instead of trying to put a round peg in a square hole.

Matthias Melcher

unread,
Feb 5, 2019, 5:23:15 AM2/5/19
to fltkg...@googlegroups.com
Thanks to the availability of virtual machines, I have installed FLTK on a completely bare MacOS machine from scratch. The instructions are in README.macOS.md or here: https://github.com/fltk/fltk/blob/master/README.macOS.md . I am planning to do Youtube videos for the CMake/Xcode option on MacOS as soon as we have a preferred way to install libraries and to start new projects, with and without Fluid.

The same could be easily done for other platforms. It requires a virtual machine at different stages, and about a day of work.

The goal is something like "All steps needed from a brand new Mac/PC to a distributable application". If nobody else does it, I will eventually do the text and video for MSWindows, Linux, and Android as well.  ("Buy your first computer and sell your first app in 6 hours" ;-) )

Francesco Piscani

unread,
Feb 5, 2019, 7:33:46 AM2/5/19
to fltkg...@googlegroups.com
That's a great idea, Matthias. In the past I have also created some videos for Linux to help beginners to overcome some programming issues.

--

Daniel G.

unread,
Feb 5, 2019, 10:45:43 AM2/5/19
to fltk.general
1+ on this. If this book is a introduction to c++ I assume that many readers are not aware of cmake and autotools, and do not know how to use this tools.

Albrecht Schlosser

unread,
Feb 5, 2019, 12:02:36 PM2/5/19
to fltkg...@googlegroups.com
On 05.02.2019 11:23 'Matthias Melcher' via fltk.general wrote:
> Thanks to the availability of virtual machines, I have installed FLTK on
> a completely bare MacOS machine from scratch. The instructions are in
> README.macOS.md or here:
> https://github.com/fltk/fltk/blob/master/README.macOS.md . I am planning
> to do Youtube videos for the CMake/Xcode option on MacOS as soon as we
> have a preferred way to install libraries and to start new projects,
> with and without Fluid.

It would be great if you could do that. I agree that we'd need to find
consensus on how to do particular things (steps) during the process. For
instance, we should definitely NOT recommend to copy the FLTK build
artifacts (libs and headers) to the Visual Studio tree as suggested in
some README files (maybe already removed, but I'm not sure).

We should definitely clean up the README files first and, BTW,
consolidate them so we don't have too much redundancies. I recently
edited something and found that we had similar or identical text in
several positions even in the same file. It's hard to find and change
all occurrences to be consistent. Sometimes less is more, so I thing we
should not try to write instructions for all (or more than one) version
of a patricular tool. There should be something users (i.e. software
developers) should be able to abstract themselves. In the rare case that
something is really different between versions we should (try to)
document the newest version and, if necessary, only document differences
in older versions. Or something like that...

> The same could be easily done for other platforms. It requires a virtual
> machine at different stages, and about a day of work.
>
> The goal is something like "All steps needed from a brand new Mac/PC to
> a distributable application". If nobody else does it, I will eventually
> do the text and video for MSWindows, Linux, and Android as well.

+1

Karl Harbinger

unread,
Feb 6, 2019, 11:51:28 AM2/6/19
to fltk.general
Normally I only program for and on Linux but recently I've been working a bit with FLTK 1.3.4 on Windows using Visual Studio 2017.

Usage it pretty simple: download and install CMake and use cmake-gui to configure fltk and generate your Visual Studio project files.
Open fltk's solution file in VS and compile. Now the only thing you need to do is to configure your actual project so that it finds all the fltk headers and libraries.

The only issue is that the generated files contain absolute paths. If you want to redistribute your fltk build configuration you can write a windows batch script that
uses the command line program cmake.exe to generate the VS build files.

PS: if you want to link the vsruntime statically, select Advanced Options in cmake-gui and replace all occurrences of "/MD" in the build flags with "/MT".

Fabien Costantini

unread,
Feb 7, 2019, 2:26:53 PM2/7/19
to fltk.general
I did not tested it yet with fltk, but vs2017 can now build directly from a cmake project file, did you simply try this?
-Fab


Fabien Costantini

unread,
Feb 7, 2019, 3:14:57 PM2/7/19
to fltk.general
Retracting this idea, as I just tested it and though it load the project files properly it does not seem to like our master fltk branch ATM.
It seems to rely on a tool called 'ninja' that believes that there is no work to do...

-Fab


Fabien Costantini

unread,
Feb 7, 2019, 3:22:26 PM2/7/19
to fltk.general
It actually builds fine but generates per default the binaries in your useprofile folder under CMakeBuilds\\<UUID>\build folders you can debug any examples from the CMake file menu in vs2017.

It still won't help you directly to get more flexible include and lib paths though except if you add cmake new entries similar to the example entries from there, but that would be only for quick and dirty purpose as you would tinit the build.


-Fab


Reply all
Reply to author
Forward
0 new messages