Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can not compile in OSX 10.11 #559

Closed
mro95 opened this issue Jul 17, 2015 · 9 comments
Closed

Can not compile in OSX 10.11 #559

mro95 opened this issue Jul 17, 2015 · 9 comments
Milestone

Comments

@mro95
Copy link

mro95 commented Jul 17, 2015

Hello, I trying to install GLFW on OSX 10.11, but when I try to make it, it fails. This is the log output.

[  2%] Building C object src/CMakeFiles/glfw.dir/cocoa_init.m.o
In file included from /Users/maarten/glfw/src/cocoa_init.m:27:
In file included from /Users/maarten/glfw/src/internal.h:81:
In file included from /Users/maarten/glfw/src/cocoa_platform.h:34:
In file included from /System/Library/Frameworks/Cocoa.framework/Headers/Cocoa.h:12:
In file included from /System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:10:
In file included from /System/Library/Frameworks/Foundation.framework/Headers/NSArray.h:6:
/System/Library/Frameworks/Foundation.framework/Headers/NSEnumerator.h:7:15: error: expected ';' after @class
@class NSArray<ObjectType>;
              ^
/System/Library/Frameworks/Foundation.framework/Headers/NSEnumerator.h:7:16: error: cannot find protocol declaration for 'ObjectType'
@class NSArray<ObjectType>;
               ^
/System/Library/Frameworks/Foundation.framework/Headers/NSEnumerator.h:34:25: error: cannot find protocol declaration for 'ObjectType'
@interface NSEnumerator<ObjectType> : NSObject <NSFastEnumeration>
                        ^
/System/Library/Frameworks/Foundation.framework/Headers/NSEnumerator.h:34:37: error: expected identifier or '('
@interface NSEnumerator<ObjectType> : NSObject <NSFastEnumeration>
                                    ^
/System/Library/Frameworks/Foundation.framework/Headers/NSEnumerator.h:36:13: error: expected ')'
- (nullable ObjectType)nextObject;
            ^
/System/Library/Frameworks/Foundation.framework/Headers/NSEnumerator.h:36:3: note: to match this '('
- (nullable ObjectType)nextObject;
  ^
/System/Library/Frameworks/Foundation.framework/Headers/NSEnumerator.h:40:25: error: cannot find protocol declaration for 'ObjectType'
@interface NSEnumerator<ObjectType> (NSExtendedEnumerator)
                        ^
/System/Library/Frameworks/Foundation.framework/Headers/NSEnumerator.h:40:1: error: duplicate interface definition for class 'NSEnumerator'
@interface NSEnumerator<ObjectType> (NSExtendedEnumerator)
^
/System/Library/Frameworks/Foundation.framework/Headers/NSEnumerator.h:34:12: note: previous definition is here
@interface NSEnumerator<ObjectType> : NSObject <NSFastEnumeration>
           ^
/System/Library/Frameworks/Foundation.framework/Headers/NSEnumerator.h:40:37: error: method type specifier must start with '-' or '+'
@interface NSEnumerator<ObjectType> (NSExtendedEnumerator)
                                    ^
/System/Library/Frameworks/Foundation.framework/Headers/NSEnumerator.h:40:38: error: expected a type
@interface NSEnumerator<ObjectType> (NSExtendedEnumerator)
                                     ^
/System/Library/Frameworks/Foundation.framework/Headers/NSEnumerator.h:42:1: error: expected selector for Objective-C method
@property (readonly, copy) NSArray<ObjectType> *allObjects;
^
/System/Library/Frameworks/Foundation.framework/Headers/NSEnumerator.h:42:36: error: cannot find protocol declaration for 'ObjectType'
@property (readonly, copy) NSArray<ObjectType> *allObjects;
                                   ^
In file included from /Users/maarten/glfw/src/cocoa_init.m:27:
In file included from /Users/maarten/glfw/src/internal.h:81:
In file included from /Users/maarten/glfw/src/cocoa_platform.h:34:
In file included from /System/Library/Frameworks/Cocoa.framework/Headers/Cocoa.h:12:
In file included from /System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:10:
/System/Library/Frameworks/Foundation.framework/Headers/NSArray.h:16:32: error: cannot find protocol declaration for 'ObjectType'
@interface NSArray<__covariant ObjectType> : NSObject <NSCopying, NSMutableCopying, NSSecureCoding, NSFastEnumeration>
                               ^
/System/Library/Frameworks/Foundation.framework/Headers/NSArray.h:16:44: error: expected identifier or '('
@interface NSArray<__covariant ObjectType> : NSObject <NSCopying, NSMutableCopying, NSSecureCoding, NSFastEnumeration>
                                           ^
/System/Library/Frameworks/Foundation.framework/Headers/NSArray.h:19:4: error: expected a type
- (ObjectType)objectAtIndex:(NSUInteger)index;
   ^
/System/Library/Frameworks/Foundation.framework/Headers/NSArray.h:21:40: error: expected ')'
- (instancetype)initWithObjects:(const ObjectType [])objects count:(NSUInteger)cnt NS_DESIGNATED_INITIALIZER;
                                       ^
/System/Library/Frameworks/Foundation.framework/Headers/NSArray.h:21:33: note: to match this '('
- (instancetype)initWithObjects:(const ObjectType [])objects count:(NSUInteger)cnt NS_DESIGNATED_INITIALIZER;
                                ^
/System/Library/Frameworks/Foundation.framework/Headers/NSArray.h:26:20: error: cannot find protocol declaration for 'ObjectType'
@interface NSArray<ObjectType> (NSExtendedArray)
                   ^
/System/Library/Frameworks/Foundation.framework/Headers/NSArray.h:26:1: error: duplicate interface definition for class 'NSArray'
@interface NSArray<ObjectType> (NSExtendedArray)
^
/System/Library/Frameworks/Foundation.framework/Headers/NSArray.h:16:12: note: previous definition is here
@interface NSArray<__covariant ObjectType> : NSObject <NSCopying, NSMutableCopying, NSSecureCoding, NSFastEnumeration>
           ^
/System/Library/Frameworks/Foundation.framework/Headers/NSArray.h:26:32: error: method type specifier must start with '-' or '+'
@interface NSArray<ObjectType> (NSExtendedArray)
                               ^
/System/Library/Frameworks/Foundation.framework/Headers/NSArray.h:26:33: error: expected a type
@interface NSArray<ObjectType> (NSExtendedArray)
                                ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
make[2]: *** [src/CMakeFiles/glfw.dir/cocoa_init.m.o] Error 1
make[1]: *** [src/CMakeFiles/glfw.dir/all] Error 2
make: *** [all] Error 2
@elmindreda elmindreda added bug Bug reports and bugfix pull requests macOS labels Jul 17, 2015
@jaredjones
Copy link

Are you building with Xcode 6.x or Xcode 7 Beta?

@mro95
Copy link
Author

mro95 commented Jul 18, 2015

@jaredjones hi, I don't know. I have installed Xcode 7 beta.
btw, I am building it with this command.

cmake .
make

@jaredjones
Copy link

@mro95 Type in terminal: clang --version
What is the output?

@mro95
Copy link
Author

mro95 commented Jul 18, 2015

@jaredjones

Apple LLVM version 6.1.0 (clang-602.0.53) (based on LLVM 3.6.0svn)
Target: x86_64-apple-darwin15.0.0
Thread model: posix

@meshula
Copy link

meshula commented Jul 18, 2015

Seems like building with Xcode 6 command line tools, but Xcode 7 SDK.

@mro95
Copy link
Author

mro95 commented Jul 19, 2015

@meshula You're right, this did the trick
sudo xcode-select -switch /Applications/Xcode-beta.app

Now I've installed GLFW but when I tried to make my application I get these error's

g++ stage/*.cpp shapes/*.cpp *.cpp -o game \
        -framework OpenGL \
        -lglfw3 \
        -lm -ldl \
        -lstdc++ \
        -std=c++11 \
        -D_GNU_SOURCE=1 -D_REENTRANT
Undefined symbols for architecture x86_64:
  "_CFArrayAppendValue", referenced from:
      _addJoystickElement in libglfw3.a(iokit_joystick.m.o)
  "_CFArrayApplyFunction", referenced from:
      __glfwInitJoysticks in libglfw3.a(iokit_joystick.m.o)
      _addJoystickElement in libglfw3.a(iokit_joystick.m.o)
  "_CFArrayCreateMutable", referenced from:
      __glfwInitJoysticks in libglfw3.a(iokit_joystick.m.o)
  "_CFArrayGetCount", referenced from:
      __glfwInitJoysticks in libglfw3.a(iokit_joystick.m.o)
      _removeJoystick in libglfw3.a(iokit_joystick.m.o)
      _pollJoystickEvents in libglfw3.a(iokit_joystick.m.o)
      __glfwPlatformGetJoystickAxes in libglfw3.a(iokit_joystick.m.o)
      __glfwPlatformGetJoystickButtons in libglfw3.a(iokit_joystick.m.o)
      _addJoystickElement in libglfw3.a(iokit_joystick.m.o)
      __glfwSetVideoMode in libglfw3.a(cocoa_monitor.m.o)
      ...
  "_CFArrayGetTypeID", referenced from:
      __glfwInitJoysticks in libglfw3.a(iokit_joystick.m.o)
      _addJoystickElement in libglfw3.a(iokit_joystick.m.o)
  "_CFArrayGetValueAtIndex", referenced from:
      _removeJoystick in libglfw3.a(iokit_joystick.m.o)
      _pollJoystickEvents in libglfw3.a(iokit_joystick.m.o)
      __glfwSetVideoMode in libglfw3.a(cocoa_monitor.m.o)
      __glfwPlatformGetVideoModes in libglfw3.a(cocoa_monitor.m.o)
  "_CFArrayRemoveAllValues", referenced from:
      _removeJoystick in libglfw3.a(iokit_joystick.m.o)
  "_CFBundleCopyResourcesDirectoryURL", referenced from:
      _changeToResourcesDirectory in libglfw3.a(cocoa_init.m.o)
  "_CFBundleGetBundleWithIdentifier", referenced from:
      __glfwInitContextAPI in libglfw3.a(nsgl_context.m.o)
  "_CFBundleGetFunctionPointerForName", referenced from:
      __glfwPlatformGetProcAddress in libglfw3.a(nsgl_context.m.o)
  "_CFBundleGetMainBundle", referenced from:
      _changeToResourcesDirectory in libglfw3.a(cocoa_init.m.o)
  "_CFDictionaryGetTypeID", referenced from:
      _getElementsCFArrayHandler in libglfw3.a(iokit_joystick.m.o)
  "_CFDictionaryGetValue", referenced from:
      __glfwInitJoysticks in libglfw3.a(iokit_joystick.m.o)
      _addJoystickElement in libglfw3.a(iokit_joystick.m.o)
      _getDisplayName in libglfw3.a(cocoa_monitor.m.o)
  "_CFDictionaryGetValueIfPresent", referenced from:
      _getDisplayName in libglfw3.a(cocoa_monitor.m.o)
  "_CFGetTypeID", referenced from:
      __glfwInitJoysticks in libglfw3.a(iokit_joystick.m.o)
      _getElementsCFArrayHandler in libglfw3.a(iokit_joystick.m.o)
      _addJoystickElement in libglfw3.a(iokit_joystick.m.o)
  "_CFNumberGetValue", referenced from:
      __glfwInitJoysticks in libglfw3.a(iokit_joystick.m.o)
      _addJoystickElement in libglfw3.a(iokit_joystick.m.o)
  "_CFRelease", referenced from:
      __glfwPlatformGetProcAddress in libglfw3.a(nsgl_context.m.o)
      __glfwInitJoysticks in libglfw3.a(iokit_joystick.m.o)
      __glfwTerminateJoysticks in libglfw3.a(iokit_joystick.m.o)
      __glfwSetVideoMode in libglfw3.a(cocoa_monitor.m.o)
      _modeIsGood in libglfw3.a(cocoa_monitor.m.o)
      _vidmodeFromCGDisplayMode in libglfw3.a(cocoa_monitor.m.o)
      _getDisplayName in libglfw3.a(cocoa_monitor.m.o)
      ...
  "_CFStringCompare", referenced from:
      _modeIsGood in libglfw3.a(cocoa_monitor.m.o)
      _vidmodeFromCGDisplayMode in libglfw3.a(cocoa_monitor.m.o)
      _changeToResourcesDirectory in libglfw3.a(cocoa_init.m.o)
  "_CFStringCreateWithCString", referenced from:
      __glfwPlatformGetProcAddress in libglfw3.a(nsgl_context.m.o)
  "_CFStringGetCString", referenced from:
      __glfwInitJoysticks in libglfw3.a(iokit_joystick.m.o)
      _getDisplayName in libglfw3.a(cocoa_monitor.m.o)
  "_CFStringGetLength", referenced from:
      _getDisplayName in libglfw3.a(cocoa_monitor.m.o)
  "_CFStringGetMaximumSizeForEncoding", referenced from:
      _getDisplayName in libglfw3.a(cocoa_monitor.m.o)
  "_CFURLCopyLastPathComponent", referenced from:
      _changeToResourcesDirectory in libglfw3.a(cocoa_init.m.o)
  "_CFURLGetFileSystemRepresentation", referenced from:
      _changeToResourcesDirectory in libglfw3.a(cocoa_init.m.o)
  "_CFUUIDGetConstantUUIDWithBytes", referenced from:
      __glfwInitJoysticks in libglfw3.a(iokit_joystick.m.o)
  "_CFUUIDGetUUIDBytes", referenced from:
      __glfwInitJoysticks in libglfw3.a(iokit_joystick.m.o)
  "_CGAcquireDisplayFadeReservation", referenced from:
      _beginFadeReservation in libglfw3.a(cocoa_monitor.m.o)
  "_CGAssociateMouseAndMouseCursorPosition", referenced from:
      __glfwPlatformApplyCursorMode in libglfw3.a(cocoa_window.m.o)
  "_CGDisplayBounds", referenced from:
      _transformY in libglfw3.a(cocoa_window.m.o)
      __glfwPlatformGetMonitorPos in libglfw3.a(cocoa_monitor.m.o)
  "_CGDisplayCopyAllDisplayModes", referenced from:
      __glfwSetVideoMode in libglfw3.a(cocoa_monitor.m.o)
      __glfwPlatformGetVideoModes in libglfw3.a(cocoa_monitor.m.o)
  "_CGDisplayCopyDisplayMode", referenced from:
      __glfwSetVideoMode in libglfw3.a(cocoa_monitor.m.o)
      __glfwPlatformGetVideoMode in libglfw3.a(cocoa_monitor.m.o)
  "_CGDisplayFade", referenced from:
      _beginFadeReservation in libglfw3.a(cocoa_monitor.m.o)
      _endFadeReservation in libglfw3.a(cocoa_monitor.m.o)
  "_CGDisplayGammaTableCapacity", referenced from:
      __glfwPlatformGetGammaRamp in libglfw3.a(cocoa_monitor.m.o)
  "_CGDisplayIOServicePort", referenced from:
      _getDisplayName in libglfw3.a(cocoa_monitor.m.o)
  "_CGDisplayMirrorsDisplay", referenced from:
      __glfwPlatformGetMonitors in libglfw3.a(cocoa_monitor.m.o)
  "_CGDisplayModeCopyPixelEncoding", referenced from:
      _modeIsGood in libglfw3.a(cocoa_monitor.m.o)
      _vidmodeFromCGDisplayMode in libglfw3.a(cocoa_monitor.m.o)
  "_CGDisplayModeGetHeight", referenced from:
      _vidmodeFromCGDisplayMode in libglfw3.a(cocoa_monitor.m.o)
  "_CGDisplayModeGetIOFlags", referenced from:
      _modeIsGood in libglfw3.a(cocoa_monitor.m.o)
  "_CGDisplayModeGetRefreshRate", referenced from:
      _vidmodeFromCGDisplayMode in libglfw3.a(cocoa_monitor.m.o)
  "_CGDisplayModeGetWidth", referenced from:
      _vidmodeFromCGDisplayMode in libglfw3.a(cocoa_monitor.m.o)
  "_CGDisplayModeRelease", referenced from:
      __glfwPlatformGetVideoMode in libglfw3.a(cocoa_monitor.m.o)
      __glfwRestoreVideoMode in libglfw3.a(cocoa_monitor.m.o)
  "_CGDisplayMoveCursorToPoint", referenced from:
      __glfwPlatformSetCursorPos in libglfw3.a(cocoa_window.m.o)
  "_CGDisplayScreenSize", referenced from:
      __glfwPlatformGetMonitors in libglfw3.a(cocoa_monitor.m.o)
  "_CGDisplaySetDisplayMode", referenced from:
      __glfwSetVideoMode in libglfw3.a(cocoa_monitor.m.o)
      __glfwRestoreVideoMode in libglfw3.a(cocoa_monitor.m.o)
  "_CGEventSourceCreate", referenced from:
      __glfwPlatformInit in libglfw3.a(cocoa_init.m.o)
  "_CGEventSourceSetLocalEventsSuppressionInterval", referenced from:
      __glfwPlatformInit in libglfw3.a(cocoa_init.m.o)
  "_CGGetDisplayTransferByTable", referenced from:
      __glfwPlatformGetGammaRamp in libglfw3.a(cocoa_monitor.m.o)
  "_CGGetOnlineDisplayList", referenced from:
      __glfwPlatformGetMonitors in libglfw3.a(cocoa_monitor.m.o)
  "_CGMainDisplayID", referenced from:
      _transformY in libglfw3.a(cocoa_window.m.o)
  "_CGReleaseDisplayFadeReservation", referenced from:
      _endFadeReservation in libglfw3.a(cocoa_monitor.m.o)
  "_CGSetDisplayTransferByTable", referenced from:
      __glfwPlatformSetGammaRamp in libglfw3.a(cocoa_monitor.m.o)
  "_CGWarpMouseCursorPosition", referenced from:
      __glfwPlatformSetCursorPos in libglfw3.a(cocoa_window.m.o)
  "_CGWindowLevelForKey", referenced from:
      _createWindow in libglfw3.a(cocoa_window.m.o)
  "_CVDisplayLinkCreateWithCGDisplay", referenced from:
      __glfwSetVideoMode in libglfw3.a(cocoa_monitor.m.o)
      __glfwPlatformGetVideoMode in libglfw3.a(cocoa_monitor.m.o)
      __glfwPlatformGetVideoModes in libglfw3.a(cocoa_monitor.m.o)
  "_CVDisplayLinkGetNominalOutputVideoRefreshPeriod", referenced from:
      _vidmodeFromCGDisplayMode in libglfw3.a(cocoa_monitor.m.o)
  "_CVDisplayLinkRelease", referenced from:
      __glfwSetVideoMode in libglfw3.a(cocoa_monitor.m.o)
      __glfwPlatformGetVideoMode in libglfw3.a(cocoa_monitor.m.o)
      __glfwPlatformGetVideoModes in libglfw3.a(cocoa_monitor.m.o)
  "_IOCreatePlugInInterfaceForService", referenced from:
      __glfwInitJoysticks in libglfw3.a(iokit_joystick.m.o)
  "_IODisplayCreateInfoDictionary", referenced from:
      _getDisplayName in libglfw3.a(cocoa_monitor.m.o)
  "_IOIteratorNext", referenced from:
      __glfwInitJoysticks in libglfw3.a(iokit_joystick.m.o)
  "_IOMasterPort", referenced from:
      __glfwInitJoysticks in libglfw3.a(iokit_joystick.m.o)
  "_IORegistryEntryCreateCFProperties", referenced from:
      __glfwInitJoysticks in libglfw3.a(iokit_joystick.m.o)
  "_IORegistryEntryCreateCFProperty", referenced from:
      __glfwInitJoysticks in libglfw3.a(iokit_joystick.m.o)
  "_IOServiceGetMatchingServices", referenced from:
      __glfwInitJoysticks in libglfw3.a(iokit_joystick.m.o)
  "_IOServiceMatching", referenced from:
      __glfwInitJoysticks in libglfw3.a(iokit_joystick.m.o)
  "_NSApp", referenced from:
      -[GLFWApplicationDelegate applicationDidFinishLaunching:] in libglfw3.a(cocoa_window.m.o)
      __glfwPlatformPostEmptyEvent in libglfw3.a(cocoa_window.m.o)
      _initializeAppKit in libglfw3.a(cocoa_window.m.o)
      __glfwPlatformShowWindow in libglfw3.a(cocoa_window.m.o)
      __glfwPlatformPollEvents in libglfw3.a(cocoa_window.m.o)
      __glfwPlatformWaitEvents in libglfw3.a(cocoa_window.m.o)
      _createMenuBar in libglfw3.a(cocoa_window.m.o)
      ...
  "_NSAppKitVersionNumber", referenced from:
      _convertRectToBacking in libglfw3.a(cocoa_window.m.o)
      -[GLFWContentView scrollWheel:] in libglfw3.a(cocoa_window.m.o)
      __glfwPlatformCreateWindow in libglfw3.a(cocoa_window.m.o)
      _createWindow in libglfw3.a(cocoa_window.m.o)
      _createMenuBar in libglfw3.a(cocoa_window.m.o)
  "_NSCalibratedRGBColorSpace", referenced from:
      __glfwPlatformCreateCursor in libglfw3.a(cocoa_window.m.o)
  "_NSDefaultRunLoopMode", referenced from:
      __glfwPlatformPollEvents in libglfw3.a(cocoa_window.m.o)
      __glfwPlatformWaitEvents in libglfw3.a(cocoa_window.m.o)
  "_NSFilenamesPboardType", referenced from:
      -[GLFWContentView initWithGlfwWindow:] in libglfw3.a(cocoa_window.m.o)
      -[GLFWContentView performDragOperation:] in libglfw3.a(cocoa_window.m.o)
  "_NSSelectorFromString", referenced from:
      _createMenuBar in libglfw3.a(cocoa_window.m.o)
  "_NSStringPboardType", referenced from:
      __glfwPlatformSetClipboardString in libglfw3.a(cocoa_window.m.o)
      __glfwPlatformGetClipboardString in libglfw3.a(cocoa_window.m.o)
  "_NSZeroPoint", referenced from:
      +[GLFWContentView initialize] in libglfw3.a(cocoa_window.m.o)
  "_OBJC_CLASS_$_NSApplication", referenced from:
      _OBJC_CLASS_$_GLFWApplication in libglfw3.a(cocoa_window.m.o)
  "_OBJC_CLASS_$_NSArray", referenced from:
      objc-class-ref in libglfw3.a(cocoa_window.m.o)
  "_OBJC_CLASS_$_NSAutoreleasePool", referenced from:
      objc-class-ref in libglfw3.a(cocoa_window.m.o)
      objc-class-ref in libglfw3.a(cocoa_init.m.o)
  "_OBJC_CLASS_$_NSBitmapImageRep", referenced from:
      objc-class-ref in libglfw3.a(cocoa_window.m.o)
  "_OBJC_CLASS_$_NSBundle", referenced from:
      objc-class-ref in libglfw3.a(cocoa_window.m.o)
  "_OBJC_CLASS_$_NSCursor", referenced from:
      objc-class-ref in libglfw3.a(cocoa_window.m.o)
  "_OBJC_CLASS_$_NSDate", referenced from:
      objc-class-ref in libglfw3.a(cocoa_window.m.o)
  "_OBJC_CLASS_$_NSEvent", referenced from:
      objc-class-ref in libglfw3.a(cocoa_window.m.o)
  "_OBJC_CLASS_$_NSImage", referenced from:
      objc-class-ref in libglfw3.a(cocoa_window.m.o)
  "_OBJC_CLASS_$_NSMenu", referenced from:
      objc-class-ref in libglfw3.a(cocoa_window.m.o)
  "_OBJC_CLASS_$_NSMenuItem", referenced from:
      objc-class-ref in libglfw3.a(cocoa_window.m.o)
  "_OBJC_CLASS_$_NSObject", referenced from:
      _OBJC_CLASS_$_GLFWWindowDelegate in libglfw3.a(cocoa_window.m.o)
      _OBJC_CLASS_$_GLFWApplicationDelegate in libglfw3.a(cocoa_window.m.o)
  "_OBJC_CLASS_$_NSOpenGLContext", referenced from:
      objc-class-ref in libglfw3.a(nsgl_context.m.o)
  "_OBJC_CLASS_$_NSOpenGLPixelFormat", referenced from:
      objc-class-ref in libglfw3.a(nsgl_context.m.o)
  "_OBJC_CLASS_$_NSOpenGLView", referenced from:
      _OBJC_CLASS_$_GLFWContentView in libglfw3.a(cocoa_window.m.o)
  "_OBJC_CLASS_$_NSPasteboard", referenced from:
      objc-class-ref in libglfw3.a(cocoa_window.m.o)
  "_OBJC_CLASS_$_NSScreen", referenced from:
      objc-class-ref in libglfw3.a(cocoa_monitor.m.o)
  "_OBJC_CLASS_$_NSString", referenced from:
      objc-class-ref in libglfw3.a(cocoa_window.m.o)
  "_OBJC_CLASS_$_NSTrackingArea", referenced from:
      objc-class-ref in libglfw3.a(cocoa_window.m.o)
  "_OBJC_CLASS_$_NSWindow", referenced from:
      _OBJC_CLASS_$_GLFWWindow in libglfw3.a(cocoa_window.m.o)
  "_OBJC_METACLASS_$_NSApplication", referenced from:
      _OBJC_METACLASS_$_GLFWApplication in libglfw3.a(cocoa_window.m.o)
  "_OBJC_METACLASS_$_NSObject", referenced from:
      _OBJC_METACLASS_$_GLFWWindowDelegate in libglfw3.a(cocoa_window.m.o)
      _OBJC_METACLASS_$_GLFWApplicationDelegate in libglfw3.a(cocoa_window.m.o)
      _OBJC_METACLASS_$_GLFWContentView in libglfw3.a(cocoa_window.m.o)
      _OBJC_METACLASS_$_GLFWWindow in libglfw3.a(cocoa_window.m.o)
      _OBJC_METACLASS_$_GLFWApplication in libglfw3.a(cocoa_window.m.o)
  "_OBJC_METACLASS_$_NSOpenGLView", referenced from:
      _OBJC_METACLASS_$_GLFWContentView in libglfw3.a(cocoa_window.m.o)
  "_OBJC_METACLASS_$_NSWindow", referenced from:
      _OBJC_METACLASS_$_GLFWWindow in libglfw3.a(cocoa_window.m.o)
  "___CFConstantStringClassReference", referenced from:
      CFString in libglfw3.a(cocoa_window.m.o)
      CFString in libglfw3.a(cocoa_window.m.o)
      CFString in libglfw3.a(cocoa_window.m.o)
      CFString in libglfw3.a(cocoa_window.m.o)
      CFString in libglfw3.a(cocoa_window.m.o)
      CFString in libglfw3.a(cocoa_window.m.o)
      CFString in libglfw3.a(cocoa_window.m.o)
      ...
  "__objc_empty_cache", referenced from:
      _OBJC_CLASS_$_GLFWWindowDelegate in libglfw3.a(cocoa_window.m.o)
      _OBJC_METACLASS_$_GLFWWindowDelegate in libglfw3.a(cocoa_window.m.o)
      _OBJC_METACLASS_$_GLFWApplicationDelegate in libglfw3.a(cocoa_window.m.o)
      _OBJC_CLASS_$_GLFWApplicationDelegate in libglfw3.a(cocoa_window.m.o)
      _OBJC_CLASS_$_GLFWContentView in libglfw3.a(cocoa_window.m.o)
      _OBJC_METACLASS_$_GLFWContentView in libglfw3.a(cocoa_window.m.o)
      _OBJC_METACLASS_$_GLFWWindow in libglfw3.a(cocoa_window.m.o)
      ...
  "_kCFAllocatorDefault", referenced from:
      __glfwPlatformGetProcAddress in libglfw3.a(nsgl_context.m.o)
      __glfwInitJoysticks in libglfw3.a(iokit_joystick.m.o)
  "_objc_msgSend", referenced from:
      _enterFullscreenMode in libglfw3.a(cocoa_window.m.o)
      -[GLFWApplicationDelegate applicationDidFinishLaunching:] in libglfw3.a(cocoa_window.m.o)
      __glfwPlatformPostEmptyEvent in libglfw3.a(cocoa_window.m.o)
      +[GLFWContentView initialize] in libglfw3.a(cocoa_window.m.o)
      -[GLFWContentView initWithGlfwWindow:] in libglfw3.a(cocoa_window.m.o)
      -[GLFWContentView dealloc] in libglfw3.a(cocoa_window.m.o)
      _updateModeCursor in libglfw3.a(cocoa_window.m.o)
      ...
  "_objc_msgSendSuper2", referenced from:
      -[GLFWWindowDelegate initWithGlfwWindow:] in libglfw3.a(cocoa_window.m.o)
      -[GLFWContentView initWithGlfwWindow:] in libglfw3.a(cocoa_window.m.o)
      -[GLFWContentView dealloc] in libglfw3.a(cocoa_window.m.o)
      -[GLFWContentView updateTrackingAreas] in libglfw3.a(cocoa_window.m.o)
      -[GLFWApplication sendEvent:] in libglfw3.a(cocoa_window.m.o)
  "_objc_msgSend_stret", referenced from:
      -[GLFWWindowDelegate windowDidResize:] in libglfw3.a(cocoa_window.m.o)
      _convertRectToBacking in libglfw3.a(cocoa_window.m.o)
      __glfwPlatformGetWindowPos in libglfw3.a(cocoa_window.m.o)
      _enterFullscreenMode in libglfw3.a(cocoa_window.m.o)
      -[GLFWContentView mouseMoved:] in libglfw3.a(cocoa_window.m.o)
      -[GLFWContentView viewDidChangeBackingProperties] in libglfw3.a(cocoa_window.m.o)
      -[GLFWContentView updateTrackingAreas] in libglfw3.a(cocoa_window.m.o)
      ...
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [build] Error 1

@mro95
Copy link
Author

mro95 commented Jul 19, 2015

Maybe the Make output of GLFW is useful:

[  2%] Building C object src/CMakeFiles/glfw.dir/context.c.o
[  4%] Building C object src/CMakeFiles/glfw.dir/init.c.o
[  6%] Building C object src/CMakeFiles/glfw.dir/input.c.o
[  8%] Building C object src/CMakeFiles/glfw.dir/monitor.c.o
[ 10%] Building C object src/CMakeFiles/glfw.dir/window.c.o
[ 12%] Building C object src/CMakeFiles/glfw.dir/cocoa_init.m.o
[ 14%] Building C object src/CMakeFiles/glfw.dir/cocoa_monitor.m.o
/Users/maarten/glfw/src/cocoa_monitor.m:52:42: warning: 'CGDisplayIOServicePort' is
      deprecated: first deprecated in OS X 10.9 [-Wdeprecated-declarations]
    info = IODisplayCreateInfoDictionary(CGDisplayIOServicePort(displayID),
                                         ^
/System/Library/Frameworks/CoreGraphics.framework/Headers/CGDisplayConfiguration.h:372:24: note:
      'CGDisplayIOServicePort' has been explicitly marked deprecated here
CG_EXTERN io_service_t CGDisplayIOServicePort(CGDirectDisplayID display)
                       ^
/Users/maarten/glfw/src/cocoa_monitor.m:91:26: warning:
      'CGDisplayModeCopyPixelEncoding' is deprecated: first deprecated in OS X 10.11
      [-Wdeprecated-declarations]
    CFStringRef format = CGDisplayModeCopyPixelEncoding(mode);
                         ^
/System/Library/Frameworks/CoreGraphics.framework/Headers/CGDirectDisplay.h:174:34: note:
      'CGDisplayModeCopyPixelEncoding' has been explicitly marked deprecated here
CG_EXTERN CFStringRef __nullable CGDisplayModeCopyPixelEncoding(
                                 ^
/Users/maarten/glfw/src/cocoa_monitor.m:120:26: warning:
      'CGDisplayModeCopyPixelEncoding' is deprecated: first deprecated in OS X 10.11
      [-Wdeprecated-declarations]
    CFStringRef format = CGDisplayModeCopyPixelEncoding(mode);
                         ^
/System/Library/Frameworks/CoreGraphics.framework/Headers/CGDirectDisplay.h:174:34: note:
      'CGDisplayModeCopyPixelEncoding' has been explicitly marked deprecated here
CG_EXTERN CFStringRef __nullable CGDisplayModeCopyPixelEncoding(
                                 ^
3 warnings generated.
[ 16%] Building C object src/CMakeFiles/glfw.dir/cocoa_window.m.o
/Users/maarten/glfw/src/cocoa_window.m:1152:56: warning: 'convertBaseToScreen:' is
      deprecated: first deprecated in OS X 10.7 - Use -convertRectToScreen: instead
      [-Wdeprecated-declarations]
        const NSPoint globalPoint = [window->ns.object convertBaseToScreen:localPoint];
                                                       ^
/System/Library/Frameworks/AppKit.framework/Headers/NSWindow.h:692:1: note:
      'convertBaseToScreen:' has been explicitly marked deprecated here
- (NSPoint)convertBaseToScreen:(NSPoint)aPoint NS_DEPRECATED_MAC(10_0, 10_7, "Us...
^
1 warning generated.
[ 18%] Building C object src/CMakeFiles/glfw.dir/iokit_joystick.m.o
[ 20%] Building C object src/CMakeFiles/glfw.dir/mach_time.c.o
[ 22%] Building C object src/CMakeFiles/glfw.dir/posix_tls.c.o
[ 24%] Building C object src/CMakeFiles/glfw.dir/nsgl_context.m.o
Linking C static library libglfw3.a
[ 24%] Built target glfw
[ 26%] Building C object examples/CMakeFiles/Boing.dir/boing.c.o
/Users/maarten/glfw/examples/boing.c:241:4: warning: 'gluPerspective' is deprecated:
      first deprecated in OS X 10.9 - "Use GLKMatrix4MakePerspective"
      [-Wdeprecated-declarations]
   gluPerspective( PerspectiveAngle( RADIUS * 2, 200 ),
   ^
/System/Library/Frameworks/OpenGL.framework/Headers/glu.h:278:13: note:
      'gluPerspective' has been explicitly marked deprecated here
extern void gluPerspective (GLdouble fovy, GLdouble aspect, GLdouble zNear, GLdo...
            ^
/Users/maarten/glfw/examples/boing.c:249:4: warning: 'gluLookAt' is deprecated: first
      deprecated in OS X 10.9 - "Use GLKMatrix4MakeLookAt" [-Wdeprecated-declarations]
   gluLookAt( 0.0, 0.0, VIEW_SCENE_DIST,/* eye */
   ^
/System/Library/Frameworks/OpenGL.framework/Headers/glu.h:265:13: note: 'gluLookAt' has
      been explicitly marked deprecated here
extern void gluLookAt (GLdouble eyeX, GLdouble eyeY, GLdouble eyeZ, GLdouble cen...
            ^
2 warnings generated.
Linking C executable Boing.app/Contents/MacOS/Boing
[ 26%] Built target Boing
[ 28%] Building C object examples/CMakeFiles/Gears.dir/gears.c.o
Linking C executable Gears.app/Contents/MacOS/Gears
[ 28%] Built target Gears
[ 30%] Building C object examples/CMakeFiles/Heightmap.dir/heightmap.c.o
[ 32%] Building C object examples/CMakeFiles/Heightmap.dir/__/deps/glad.c.o
Linking C executable Heightmap.app/Contents/MacOS/Heightmap
[ 32%] Built target Heightmap
[ 34%] Building C object examples/CMakeFiles/Particles.dir/particles.c.o
/Users/maarten/glfw/examples/particles.c:798:5: warning: 'gluPerspective' is deprecated:
      first deprecated in OS X 10.9 - "Use GLKMatrix4MakePerspective"
      [-Wdeprecated-declarations]
    gluPerspective(65.0, aspect_ratio, 1.0, 60.0);
    ^
/System/Library/Frameworks/OpenGL.framework/Headers/glu.h:278:13: note:
      'gluPerspective' has been explicitly marked deprecated here
extern void gluPerspective (GLdouble fovy, GLdouble aspect, GLdouble zNear, GLdo...
            ^
1 warning generated.
[ 36%] Building C object examples/CMakeFiles/Particles.dir/__/deps/tinycthread.c.o
Linking C executable Particles.app/Contents/MacOS/Particles
[ 36%] Built target Particles
[ 38%] Building C object examples/CMakeFiles/Simple.dir/simple.c.o
Linking C executable Simple.app/Contents/MacOS/Simple
[ 38%] Built target Simple
[ 40%] Building C object examples/CMakeFiles/SplitView.dir/splitview.c.o
/Users/maarten/glfw/examples/splitview.c:161:5: warning: 'gluLookAt' is deprecated:
      first deprecated in OS X 10.9 - "Use GLKMatrix4MakeLookAt"
      [-Wdeprecated-declarations]
    gluLookAt(0.0, 0.0, 1.0,
    ^
/System/Library/Frameworks/OpenGL.framework/Headers/glu.h:265:13: note: 'gluLookAt' has
      been explicitly marked deprecated here
extern void gluLookAt (GLdouble eyeX, GLdouble eyeY, GLdouble eyeZ, GLdouble cen...
            ^
/Users/maarten/glfw/examples/splitview.c:251:5: warning: 'gluLookAt' is deprecated:
      first deprecated in OS X 10.9 - "Use GLKMatrix4MakeLookAt"
      [-Wdeprecated-declarations]
    gluLookAt(0.0f, 10.0f, 1e-3f,   // Eye-position (above)
    ^
/System/Library/Frameworks/OpenGL.framework/Headers/glu.h:265:13: note: 'gluLookAt' has
      been explicitly marked deprecated here
extern void gluLookAt (GLdouble eyeX, GLdouble eyeY, GLdouble eyeZ, GLdouble cen...
            ^
/Users/maarten/glfw/examples/splitview.c:262:5: warning: 'gluLookAt' is deprecated:
      first deprecated in OS X 10.9 - "Use GLKMatrix4MakeLookAt"
      [-Wdeprecated-declarations]
    gluLookAt(0.0f, 0.0f, 10.0f,    // Eye-position (in front of)
    ^
/System/Library/Frameworks/OpenGL.framework/Headers/glu.h:265:13: note: 'gluLookAt' has
      been explicitly marked deprecated here
extern void gluLookAt (GLdouble eyeX, GLdouble eyeY, GLdouble eyeZ, GLdouble cen...
            ^
/Users/maarten/glfw/examples/splitview.c:273:5: warning: 'gluLookAt' is deprecated:
      first deprecated in OS X 10.9 - "Use GLKMatrix4MakeLookAt"
      [-Wdeprecated-declarations]
    gluLookAt(10.0f, 0.0f, 0.0f,    // Eye-position (to the right)
    ^
/System/Library/Frameworks/OpenGL.framework/Headers/glu.h:265:13: note: 'gluLookAt' has
      been explicitly marked deprecated here
extern void gluLookAt (GLdouble eyeX, GLdouble eyeY, GLdouble eyeZ, GLdouble cen...
            ^
/Users/maarten/glfw/examples/splitview.c:296:5: warning: 'gluPerspective' is deprecated:
      first deprecated in OS X 10.9 - "Use GLKMatrix4MakePerspective"
      [-Wdeprecated-declarations]
    gluPerspective(65.0f, aspect, 1.0f, 50.0f);
    ^
/System/Library/Frameworks/OpenGL.framework/Headers/glu.h:278:13: note:
      'gluPerspective' has been explicitly marked deprecated here
extern void gluPerspective (GLdouble fovy, GLdouble aspect, GLdouble zNear, GLdo...
            ^
/Users/maarten/glfw/examples/splitview.c:303:5: warning: 'gluLookAt' is deprecated:
      first deprecated in OS X 10.9 - "Use GLKMatrix4MakeLookAt"
      [-Wdeprecated-declarations]
    gluLookAt(3.0f, 1.5f, 3.0f,     // Eye-position
    ^
/System/Library/Frameworks/OpenGL.framework/Headers/glu.h:265:13: note: 'gluLookAt' has
      been explicitly marked deprecated here
extern void gluLookAt (GLdouble eyeX, GLdouble eyeY, GLdouble eyeZ, GLdouble cen...
            ^
6 warnings generated.
Linking C executable SplitView.app/Contents/MacOS/SplitView
[ 40%] Built target SplitView
[ 42%] Building C object examples/CMakeFiles/Wave.dir/wave.c.o
/Users/maarten/glfw/examples/wave.c:375:5: warning: 'gluPerspective' is deprecated:
      first deprecated in OS X 10.9 - "Use GLKMatrix4MakePerspective"
      [-Wdeprecated-declarations]
    gluPerspective(60.0, ratio, 1.0, 1024.0);
    ^
/System/Library/Frameworks/OpenGL.framework/Headers/glu.h:278:13: note:
      'gluPerspective' has been explicitly marked deprecated here
extern void gluPerspective (GLdouble fovy, GLdouble aspect, GLdouble zNear, GLdo...
            ^
1 warning generated.
Linking C executable Wave.app/Contents/MacOS/Wave
[ 42%] Built target Wave
[ 44%] Building C object tests/CMakeFiles/accuracy.dir/accuracy.c.o
Linking C executable accuracy.app/Contents/MacOS/accuracy
[ 44%] Built target accuracy
[ 46%] Building C object tests/CMakeFiles/clipboard.dir/clipboard.c.o
[ 48%] Building C object tests/CMakeFiles/clipboard.dir/__/deps/getopt.c.o
Linking C executable clipboard
[ 48%] Built target clipboard
[ 50%] Building C object tests/CMakeFiles/cursor.dir/cursor.c.o
Linking C executable cursor
[ 50%] Built target cursor
[ 52%] Building C object tests/CMakeFiles/cursoranim.dir/cursoranim.c.o
Linking C executable cursoranim.app/Contents/MacOS/cursoranim
[ 52%] Built target cursoranim
[ 54%] Building C object tests/CMakeFiles/defaults.dir/defaults.c.o
Linking C executable defaults
[ 54%] Built target defaults
[ 56%] Building C object tests/CMakeFiles/empty.dir/empty.c.o
[ 58%] Building C object tests/CMakeFiles/empty.dir/__/deps/tinycthread.c.o
Linking C executable empty.app/Contents/MacOS/empty
[ 58%] Built target empty
[ 60%] Building C object tests/CMakeFiles/events.dir/events.c.o
[ 62%] Building C object tests/CMakeFiles/events.dir/__/deps/getopt.c.o
Linking C executable events
[ 62%] Built target events
[ 64%] Building C object tests/CMakeFiles/fsaa.dir/fsaa.c.o
[ 66%] Building C object tests/CMakeFiles/fsaa.dir/__/deps/getopt.c.o
Linking C executable fsaa
[ 66%] Built target fsaa
[ 68%] Building C object tests/CMakeFiles/gamma.dir/gamma.c.o
[ 70%] Building C object tests/CMakeFiles/gamma.dir/__/deps/getopt.c.o
Linking C executable gamma
[ 70%] Built target gamma
[ 72%] Building C object tests/CMakeFiles/glfwinfo.dir/glfwinfo.c.o
[ 74%] Building C object tests/CMakeFiles/glfwinfo.dir/__/deps/getopt.c.o
Linking C executable glfwinfo
[ 74%] Built target glfwinfo
[ 76%] Building C object tests/CMakeFiles/iconify.dir/iconify.c.o
[ 78%] Building C object tests/CMakeFiles/iconify.dir/__/deps/getopt.c.o
Linking C executable iconify
[ 78%] Built target iconify
[ 80%] Building C object tests/CMakeFiles/joysticks.dir/joysticks.c.o
Linking C executable joysticks
[ 80%] Built target joysticks
[ 82%] Building C object tests/CMakeFiles/monitors.dir/monitors.c.o
[ 84%] Building C object tests/CMakeFiles/monitors.dir/__/deps/getopt.c.o
Linking C executable monitors
[ 84%] Built target monitors
[ 86%] Building C object tests/CMakeFiles/peter.dir/peter.c.o
Linking C executable peter
[ 86%] Built target peter
[ 88%] Building C object tests/CMakeFiles/reopen.dir/reopen.c.o
Linking C executable reopen
[ 88%] Built target reopen
[ 90%] Building C object tests/CMakeFiles/sharing.dir/sharing.c.o
Linking C executable sharing.app/Contents/MacOS/sharing
[ 90%] Built target sharing
[ 92%] Building C object tests/CMakeFiles/tearing.dir/tearing.c.o
Linking C executable tearing.app/Contents/MacOS/tearing
[ 92%] Built target tearing
[ 94%] Building C object tests/CMakeFiles/threads.dir/threads.c.o
[ 96%] Building C object tests/CMakeFiles/threads.dir/__/deps/tinycthread.c.o
Linking C executable threads.app/Contents/MacOS/threads
[ 96%] Built target threads
[ 98%] Building C object tests/CMakeFiles/title.dir/title.c.o
Linking C executable title.app/Contents/MacOS/title
[ 98%] Built target title
[100%] Building C object tests/CMakeFiles/windows.dir/windows.c.o
Linking C executable windows.app/Contents/MacOS/windows
[100%] Built target windows
Install the project...
-- Install configuration: ""
-- Up-to-date: /usr/local/include/GLFW
-- Up-to-date: /usr/local/include/GLFW/glfw3.h
-- Up-to-date: /usr/local/include/GLFW/glfw3native.h
-- Up-to-date: /usr/local/lib/cmake/glfw/glfw3Config.cmake
-- Up-to-date: /usr/local/lib/cmake/glfw/glfw3ConfigVersion.cmake
-- Up-to-date: /usr/local/lib/cmake/glfw/glfwTargets.cmake
-- Up-to-date: /usr/local/lib/cmake/glfw/glfwTargets-noconfig.cmake
-- Up-to-date: /usr/local/lib/pkgconfig/glfw3.pc
-- Installing: /usr/local/lib/libglfw3.a

@mro95
Copy link
Author

mro95 commented Jul 19, 2015

Ah I've found a solution, just use brew install to install glfw.
Thanks all for your help. Final solution:

sudo xcode-select -switch /Applications/Xcode-beta.app;
brew install glfw3

@mro95 mro95 closed this as completed Jul 19, 2015
@elmindreda elmindreda added question Please use the support label instead and removed bug Bug reports and bugfix pull requests labels Jul 19, 2015
@elmindreda elmindreda added this to the milestone Jul 19, 2015
@meshula
Copy link

meshula commented Jul 20, 2015

FWIW all those missing symbol errors you saw were due to not linking the CoreFoundation framework and other necessary frameworks (not from deprecations or anything like that).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants