所以我试图在我的mac OS X 10.10上安装FLTK。我按照README.OSX.txt文件,但当我在 make 命令上实际安装它时,我收到以下错误和警告:
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 {
有没有人知道导致此错误的原因或我可以做些什么来修复它?谢谢!
答案 0 :(得分:1)
首先转到fltk-1.3.3文件夹并输入export CXX=c++
。这将告诉编译器使用Clang ++编译FLTK。然后输入./configure
和sudo make install
。就是这样。在此之后,您可能需要通过键入fltk-config --version
来检查是否已正确安装FLTK,如果它提供1.3.3
,则可能需要检查。