【问题标题】:Error when installing FLTK 1.3.3 on mac OS X 10.10在 mac OS X 10.10 上安装 FLTK 1.3.3 时出错
【发布时间】:2014-11-23 17:03:35
【问题描述】:

所以我想在我的 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 {

有没有人知道是什么导致了这个错误或者我可以做些什么来修复它?谢谢!

【问题讨论】:

  • 你解决了吗?

标签: macos fltk


【解决方案1】:

首先进入 fltk-1.3.3 文件夹并输入export CXX=c++。这将告诉编译器使用 Clang++ 来编译 FLTK。然后输入./configuresudo make install。就是这样。在此之后,您可能需要通过键入 fltk-config --version 来检查 FLTK 是否正确安装,以及它是否提供 1.3.3

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2015-12-10
    • 2011-05-16
    • 2015-12-06
    • 1970-01-01
    • 2016-05-16
    • 1970-01-01
    • 2015-08-19
    相关资源
    最近更新 更多