how to install fltk in Xcode 8.3.3

I am trying to learn programming from the beginning (on my own), starting with C++. I an using Stroustrup's Programming book. I need to install FLTK to use with my programs, but I haven't had any luck yet. Any suggestions?

If you search for "fltk download OSX", you'll get some references where it seems it is possible to download.


But starting with C++ on XCode and through an external toolkit may not be the simplest way. Why not start with either objective C or Swift, directly ?


You could also learn the language in playground to start with.

Thanks Claude,


I have had several recommendations to learn C++ prior to Objective C, Cocoa and Swift. My end goal is to learn to create programs and apps, for Mac and iPad initially, and know how to fix them when they don't work. My progress is slow because I have a full time job already. I've started going through Stroustroup's book and made it to Chapter 12 where I need to use the FLTK toolkit to continue. I've downloaded it, and tried using the instructions for installing it with Xcode, but the instructions are for Xcode 3 or 4 so things have changed and I can't get it to work. So far I have not found an answer searching online.

What you've learned on C++ will be useful so it's not wasted time.


But if your goal is to develop apps for IOS or OSX, you should now consider switching to ObjC or Swift (my personal preference, but that's just a personal preference).


And not spend more time digging into specifics as FLTK.


Have you access to Mac to develop ?

I recommend you take Claude's advice and start with Swift or Obj-C, if your goal is to write macOS or iOS apps. The problem is that there are many core competencies involved with apps specifically for Apple's device families that use system libraries that are conceptually based on Obj-C. You cannot pass C++ objects into these APIs, and C++ memory management is different, too. (Swift has an "overlay" over these libraries that presents them in Swift-native terms, so Swift and Obj-C are directly interoperable, unlike C++ and either of them.)


Also, although the "clang" compiler is very good at compiling C++ code, the general development environment provided by Xcode is not exceptionally friendly to C++ developers.


If you wish to write only command-line utilities (as opposed to app with a UI), and you wish to become familiar with C++ for programming outside the Apple universe, then your current course is fine. Otherwise, you're kind of going a very long way round.


(It's certainly true that plenty of macOS or iOS developers use C++, but that's usually because they had C++ skills, and preferred the language they knew. They still had to learn Obj-C or Swift in order to write complete apps.)


FWIW, I also recommend you choose Swift over Obj-C. It's more productive (especially if you're new to both), and it's a language with much more modern features. But this choice is a matter of taste, not of necessity.

how to install fltk in Xcode 8.3.3
 
 
Q