So I am trying to install FLTK on my mac OS X 10.10. I follow the README.OSX.txt file, but when I get to actually installing it on the make command, I get the following error and warning:
Fl_cocoa.mm:4080:5: error: unknown type name 'NSOperatingSystemVersion'
NSOperatingSystemVersion version = [[NSProcessInfo processInfo] operatingSystemVersion];
^
Fl_cocoa.mm:4080:69: warning: instance method '-operatingSystemVersion' not found (return type defaults to 'id') [-Wobjc-method-access]
NSOperatingSystemVersion version = [[NSProcessInfo processInfo] operatingSystemVersion];
^~~~~~~~~~~~~~~~~~~~~~
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSProcessInfo.h:20:12: note:
receiver is instance of class declared here
@interface NSProcessInfo : NSObject {
Does anyone have any idea what is causing this error or anything that I could do to fix it? Thanks!
First go to the fltk-1.3.3 folder and type
export CXX=c++
. This will tell the compiler to use Clang++ to compile FLTK. Then type./configure
andsudo make install
. That's it. After this, you might want to check if FLTK is properly installed by typingfltk-config --version
and to if it gives1.3.3
.