2014-11-23 88 views
1

所以我試圖在我的Mac OS X 10.10上安裝FLTK。我按照README.OSX.txt文件,但是當我真正在安裝它使命令,我收到以下錯誤和警告:在Mac OS X上安裝FLTK 1.3.3時出錯10.10

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

你能解決嗎? – ChatCloud 2015-09-30 14:24:19

回答

1

首先進入fltk-1.3.3文件夾並鍵入export CXX=c++。這將告訴編譯器使用Clang ++編譯FLTK。然後輸入./configuresudo make install。而已。在此之後,您可能需要通過輸入fltk-config --version來檢查FLTK是否已正確安裝,並確認它是否爲1.3.3