My background, I am currently self learning on chapter 12 of Bjarne Stroustrup, Programming Principles and Practice Using C++, 2nd Edition.
So I have been trying to install FLTK.
First attempt.
From my what i found online i needed to install it using homebrew and then access it from Xcode. As suggested here, here and here. However Homebrew was having problems with connecting to a particular website. I would share the error but now when i run homebrew I get a different error (since i updated xcode during my second attempt).
require': cannot load such file -- mach (LoadError) from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in
require' from /usr/local/Library/Homebrew/extend/pathname.rb:2:in<top (required)>' from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in
require' from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:inrequire' from /usr/local/Library/Homebrew/global.rb:3:in
' from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:inrequire' from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in
require' from /usr/local/Library/brew.rb:15:in `'
update:
reinstalled homebrew. ran brew install fltk:
brew install fltk
fltk: This formula either does not compile or function as expected on OS X versions newer than Yosemite due to an upstream incompatibility. Error: An unsatisfied requirement failed this build.
Second attempt.
So I tried "fltk-1.3.2/ide/Xcode4" as suggested here and in the comments here. After opening tar file like a zip I following the Readme for OSX. The following section is the most relevant section:
4.3 Configuring FLTK
Launch Xcode. Open the project file in
.../fltk-1.3.xxxx/ide/Xcode4/FLTK.xcodeproj
There is nothing else to configure.
4.4 Building FLTK
Use the "Scheme" pulldown menu to change the active target to "Demo" and "My Mac 32-bit" or "My Mac 64-bit". Select "Build for" -> "Running"Run" from the "Product" menu to create all libraries and test applications.
This resulted in a failed install. So i tried updating XCode from 7.1 to 7.3 and tried again. The install still failed.
The problems with the install.
- all of the files in Products are red(and not located in finder) except fltk.framework, fltk_png.framework and fltkzlib.framework .
numerous errors red and yellow see here for most of them.
Third attempt.
I unzipped a new folder of FLTK, and ran make. This resulted in the following errors.
fl_line_style.cxx:38:13: error: elaborated type refers to a typedef static enum CGLineCap fl_quartz_line_cap_ = kCGLineCapButt;
^ /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPath.h:33:26:
note:
declared here typedef CF_ENUM(int32_t, CGLineCap) { ^ fl_line_style.cxx:39:13: error: elaborated type refers to a typedef static enum CGLineJoin fl_quartz_line_join_ =
kCGLineJoinMiter;
^ /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPath.h:25:26:
note:
declared here typedef CF_ENUM(int32_t, CGLineJoin) { ^ fl_line_style.cxx:113:15: error: elaborated type refers to a typedef static enum CGLineCap Cap[4] = {
kCGLineCapButt, kCGLineCapButt,
^ /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPath.h:33:26:
note:
declared here typedef CF_ENUM(int32_t, CGLineCap) { ^ fl_line_style.cxx:115:15: error: elaborated type refers to a typedef static enum CGLineJoin Join[4] = {
kCGLineJoinMiter, kCGLineJoinMiter,
^ /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPath.h:25:26:
note:
declared here typedef CF_ENUM(int32_t, CGLineJoin) { ^ 4 errors generated. make[1]: * * * [fl_line_style.o] Error 1 make: * * * [all] Error 1
So now I am stuck. Your help would be much appreciated.