glbinding icon indicating copy to clipboard operation
glbinding copied to clipboard

macOS builds do not link required frameworks

Open IntellectualKitty opened this issue 8 years ago • 2 comments

Builds on macOS, both for Xcode and Unix, do not link Apple's required frameworks. This is using the ZIP package downloaded from Github two days ago (04/14/2017).

I've included the linker errors for glbinding-testd below as an example. (They all reference libglfw3.a, but I know that library is built correctly because GLFW's samples work.)

Undefined symbols for architecture x86_64: "_CFArrayAppendValue", referenced from: __glfwInitJoysticksNS in libglfw3.a(cocoa_joystick.o) _matchCallback in libglfw3.a(cocoa_joystick.o) "_CFArrayCreateMutable", referenced from: __glfwInitJoysticksNS in libglfw3.a(cocoa_joystick.o) _matchCallback in libglfw3.a(cocoa_joystick.o) "_CFArrayGetCount", referenced from: __glfwSetVideoModeNS in libglfw3.a(cocoa_monitor.o) __glfwPlatformGetVideoModes in libglfw3.a(cocoa_monitor.o) _matchCallback in libglfw3.a(cocoa_joystick.o) _closeJoystick in libglfw3.a(cocoa_joystick.o) __glfwPlatformPollJoystick in libglfw3.a(cocoa_joystick.o) "_CFArrayGetValueAtIndex", referenced from: __glfwSetVideoModeNS in libglfw3.a(cocoa_monitor.o) __glfwPlatformGetVideoModes in libglfw3.a(cocoa_monitor.o) _matchCallback in libglfw3.a(cocoa_joystick.o) _closeJoystick in libglfw3.a(cocoa_joystick.o) __glfwPlatformPollJoystick in libglfw3.a(cocoa_joystick.o) "_CFBundleCopyResourcesDirectoryURL", referenced from: _changeToResourcesDirectory in libglfw3.a(cocoa_init.o) "_CFBundleGetBundleWithIdentifier", referenced from: _initializeTIS in libglfw3.a(cocoa_init.o) __glfwInitNSGL in libglfw3.a(nsgl_context.o) "_CFBundleGetDataPointerForName", referenced from: _initializeTIS in libglfw3.a(cocoa_init.o) "_CFBundleGetFunctionPointerForName", referenced from: _initializeTIS in libglfw3.a(cocoa_init.o) _getProcAddressNSGL in libglfw3.a(nsgl_context.o) "_CFBundleGetMainBundle", referenced from: _changeToResourcesDirectory in libglfw3.a(cocoa_init.o) "_CFDictionaryCreateMutable", referenced from: __glfwInitJoysticksNS in libglfw3.a(cocoa_joystick.o) "_CFDictionaryGetValue", referenced from: _getDisplayName in libglfw3.a(cocoa_monitor.o) "_CFDictionaryGetValueIfPresent", referenced from: _getDisplayName in libglfw3.a(cocoa_monitor.o) "_CFDictionarySetValue", referenced from: __glfwInitJoysticksNS in libglfw3.a(cocoa_joystick.o) "_CFGetTypeID", referenced from: _matchCallback in libglfw3.a(cocoa_joystick.o) "_CFNumberCreate", referenced from: __glfwInitJoysticksNS in libglfw3.a(cocoa_joystick.o) "_CFNumberGetValue", referenced from: _getDisplayName in libglfw3.a(cocoa_monitor.o) "_CFRelease", referenced from: __glfwPlatformGetKeyName in libglfw3.a(cocoa_window.o) _updateUnicodeDataNS in libglfw3.a(cocoa_init.o) _changeToResourcesDirectory in libglfw3.a(cocoa_init.o) __glfwPlatformTerminate in libglfw3.a(cocoa_init.o) _getDisplayName in libglfw3.a(cocoa_monitor.o) __glfwSetVideoModeNS in libglfw3.a(cocoa_monitor.o) __glfwPlatformGetVideoModes in libglfw3.a(cocoa_monitor.o) ... "_CFRunLoopGetMain", referenced from: __glfwInitJoysticksNS in libglfw3.a(cocoa_joystick.o) "_CFRunLoopRunInMode", referenced from: __glfwInitJoysticksNS in libglfw3.a(cocoa_joystick.o) "_CFStringCompare", referenced from: _changeToResourcesDirectory in libglfw3.a(cocoa_init.o) "_CFStringCreateWithCString", referenced from: _getProcAddressNSGL in libglfw3.a(nsgl_context.o) "_CFStringCreateWithCharactersNoCopy", referenced from: __glfwPlatformGetKeyName in libglfw3.a(cocoa_window.o) "_CFStringGetCString", referenced from: __glfwPlatformGetKeyName in libglfw3.a(cocoa_window.o) _getDisplayName in libglfw3.a(cocoa_monitor.o) _matchCallback in libglfw3.a(cocoa_joystick.o) "_CFStringGetLength", referenced from: _getDisplayName in libglfw3.a(cocoa_monitor.o) "_CFStringGetMaximumSizeForEncoding", referenced from: _getDisplayName in libglfw3.a(cocoa_monitor.o) "_CFURLCopyLastPathComponent", referenced from: _changeToResourcesDirectory in libglfw3.a(cocoa_init.o) "_CFURLGetFileSystemRepresentation", referenced from: _changeToResourcesDirectory in libglfw3.a(cocoa_init.o) "_CGAcquireDisplayFadeReservation", referenced from: _beginFadeReservation in libglfw3.a(cocoa_monitor.o) "_CGAssociateMouseAndMouseCursorPosition", referenced from: __glfwPlatformSetCursorMode in libglfw3.a(cocoa_window.o) "_CGDisplayBounds", referenced from: _acquireMonitor in libglfw3.a(cocoa_window.o) _transformY in libglfw3.a(cocoa_window.o) __glfwPlatformGetMonitorPos in libglfw3.a(cocoa_monitor.o) "_CGDisplayCopyAllDisplayModes", referenced from: __glfwSetVideoModeNS in libglfw3.a(cocoa_monitor.o) __glfwPlatformGetVideoModes in libglfw3.a(cocoa_monitor.o) "_CGDisplayCopyDisplayMode", referenced from: __glfwSetVideoModeNS in libglfw3.a(cocoa_monitor.o) __glfwPlatformGetVideoMode in libglfw3.a(cocoa_monitor.o) "_CGDisplayFade", referenced from: _beginFadeReservation in libglfw3.a(cocoa_monitor.o) _endFadeReservation in libglfw3.a(cocoa_monitor.o) "_CGDisplayGammaTableCapacity", referenced from: __glfwPlatformGetGammaRamp in libglfw3.a(cocoa_monitor.o) "_CGDisplayIsAsleep", referenced from: __glfwPollMonitorsNS in libglfw3.a(cocoa_monitor.o) "_CGDisplayModeGetHeight", referenced from: _vidmodeFromCGDisplayMode in libglfw3.a(cocoa_monitor.o) "_CGDisplayModeGetIOFlags", referenced from: _modeIsGood in libglfw3.a(cocoa_monitor.o) "_CGDisplayModeGetRefreshRate", referenced from: _vidmodeFromCGDisplayMode in libglfw3.a(cocoa_monitor.o) "_CGDisplayModeGetWidth", referenced from: _vidmodeFromCGDisplayMode in libglfw3.a(cocoa_monitor.o) "_CGDisplayModeRelease", referenced from: __glfwPlatformGetVideoMode in libglfw3.a(cocoa_monitor.o) __glfwRestoreVideoModeNS in libglfw3.a(cocoa_monitor.o) "_CGDisplayModelNumber", referenced from: _getDisplayName in libglfw3.a(cocoa_monitor.o) "_CGDisplayMoveCursorToPoint", referenced from: __glfwPlatformSetCursorPos in libglfw3.a(cocoa_window.o) "_CGDisplayScreenSize", referenced from: __glfwPollMonitorsNS in libglfw3.a(cocoa_monitor.o) "_CGDisplaySetDisplayMode", referenced from: __glfwSetVideoModeNS in libglfw3.a(cocoa_monitor.o) __glfwRestoreVideoModeNS in libglfw3.a(cocoa_monitor.o) "_CGDisplayUnitNumber", referenced from: __glfwPollMonitorsNS in libglfw3.a(cocoa_monitor.o) "_CGDisplayVendorNumber", referenced from: _getDisplayName in libglfw3.a(cocoa_monitor.o) "_CGEventSourceCreate", referenced from: __glfwPlatformInit in libglfw3.a(cocoa_init.o) "_CGEventSourceSetLocalEventsSuppressionInterval", referenced from: __glfwPlatformInit in libglfw3.a(cocoa_init.o) "_CGGetDisplayTransferByTable", referenced from: __glfwPlatformGetGammaRamp in libglfw3.a(cocoa_monitor.o) "_CGGetOnlineDisplayList", referenced from: __glfwPollMonitorsNS in libglfw3.a(cocoa_monitor.o) "_CGMainDisplayID", referenced from: _transformY in libglfw3.a(cocoa_window.o) "_CGReleaseDisplayFadeReservation", referenced from: _endFadeReservation in libglfw3.a(cocoa_monitor.o) "_CGSetDisplayTransferByTable", referenced from: __glfwPlatformSetGammaRamp in libglfw3.a(cocoa_monitor.o) "_CGWarpMouseCursorPosition", referenced from: __glfwPlatformSetCursorPos in libglfw3.a(cocoa_window.o) "_CGWindowLevelForKey", referenced from: _createNativeWindow in libglfw3.a(cocoa_window.o) __glfwPlatformSetWindowMonitor in libglfw3.a(cocoa_window.o) __glfwPlatformSetWindowFloating in libglfw3.a(cocoa_window.o) "_CVDisplayLinkCreateWithCGDisplay", referenced from: __glfwSetVideoModeNS in libglfw3.a(cocoa_monitor.o) __glfwPlatformGetVideoMode in libglfw3.a(cocoa_monitor.o) __glfwPlatformGetVideoModes in libglfw3.a(cocoa_monitor.o) "_CVDisplayLinkGetNominalOutputVideoRefreshPeriod", referenced from: _vidmodeFromCGDisplayMode in libglfw3.a(cocoa_monitor.o) "_CVDisplayLinkRelease", referenced from: __glfwSetVideoModeNS in libglfw3.a(cocoa_monitor.o) __glfwPlatformGetVideoMode in libglfw3.a(cocoa_monitor.o) __glfwPlatformGetVideoModes in libglfw3.a(cocoa_monitor.o) "_IODisplayCreateInfoDictionary", referenced from: _getDisplayName in libglfw3.a(cocoa_monitor.o) "_IOHIDDeviceCopyMatchingElements", referenced from: _matchCallback in libglfw3.a(cocoa_joystick.o) "_IOHIDDeviceGetProperty", referenced from: _matchCallback in libglfw3.a(cocoa_joystick.o) "_IOHIDDeviceGetValue", referenced from: _getElementValue in libglfw3.a(cocoa_joystick.o) "_IOHIDElementGetLogicalMax", referenced from: _matchCallback in libglfw3.a(cocoa_joystick.o) "_IOHIDElementGetLogicalMin", referenced from: _matchCallback in libglfw3.a(cocoa_joystick.o) "_IOHIDElementGetType", referenced from: _matchCallback in libglfw3.a(cocoa_joystick.o) "_IOHIDElementGetTypeID", referenced from: _matchCallback in libglfw3.a(cocoa_joystick.o) "_IOHIDElementGetUsage", referenced from: _matchCallback in libglfw3.a(cocoa_joystick.o) "_IOHIDElementGetUsagePage", referenced from: _matchCallback in libglfw3.a(cocoa_joystick.o) "_IOHIDManagerCreate", referenced from: __glfwInitJoysticksNS in libglfw3.a(cocoa_joystick.o) "_IOHIDManagerOpen", referenced from: __glfwInitJoysticksNS in libglfw3.a(cocoa_joystick.o) "_IOHIDManagerRegisterDeviceMatchingCallback", referenced from: __glfwInitJoysticksNS in libglfw3.a(cocoa_joystick.o) "_IOHIDManagerRegisterDeviceRemovalCallback", referenced from: __glfwInitJoysticksNS in libglfw3.a(cocoa_joystick.o) "_IOHIDManagerScheduleWithRunLoop", referenced from: __glfwInitJoysticksNS in libglfw3.a(cocoa_joystick.o) "_IOHIDManagerSetDeviceMatchingMultiple", referenced from: __glfwInitJoysticksNS in libglfw3.a(cocoa_joystick.o) "_IOHIDValueGetIntegerValue", referenced from: _getElementValue in libglfw3.a(cocoa_joystick.o) "_IOIteratorNext", referenced from: _getDisplayName in libglfw3.a(cocoa_monitor.o) "_IOObjectRelease", referenced from: _getDisplayName in libglfw3.a(cocoa_monitor.o) "_IOServiceGetMatchingServices", referenced from: _getDisplayName in libglfw3.a(cocoa_monitor.o) "_IOServiceMatching", referenced from: _getDisplayName in libglfw3.a(cocoa_monitor.o) "_NSApp", referenced from: -[GLFWApplicationDelegate applicationDidFinishLaunching:] in libglfw3.a(cocoa_window.o) __glfwPlatformPostEmptyEvent in libglfw3.a(cocoa_window.o) -[GLFWContentView insertText:replacementRange:] in libglfw3.a(cocoa_window.o) -[GLFWApplication loadMainMenu] in libglfw3.a(cocoa_window.o) _initializeAppKit in libglfw3.a(cocoa_window.o) __glfwPlatformFocusWindow in libglfw3.a(cocoa_window.o) __glfwPlatformPollEvents in libglfw3.a(cocoa_window.o) ... "_NSCalibratedRGBColorSpace", referenced from: __glfwPlatformCreateCursor in libglfw3.a(cocoa_window.o) "_NSDefaultRunLoopMode", referenced from: __glfwPlatformPollEvents in libglfw3.a(cocoa_window.o) __glfwPlatformWaitEvents in libglfw3.a(cocoa_window.o) __glfwPlatformWaitEventsTimeout in libglfw3.a(cocoa_window.o) "_NSFilenamesPboardType", referenced from: -[GLFWContentView initWithGlfwWindow:] in libglfw3.a(cocoa_window.o) -[GLFWContentView performDragOperation:] in libglfw3.a(cocoa_window.o) "_NSSelectorFromString", referenced from: _createMenuBar in libglfw3.a(cocoa_window.o) "_NSStringPboardType", referenced from: __glfwPlatformSetClipboardString in libglfw3.a(cocoa_window.o) __glfwPlatformGetClipboardString in libglfw3.a(cocoa_window.o) "_NSTextInputContextKeyboardSelectionDidChangeNotification", referenced from: __glfwPlatformInit in libglfw3.a(cocoa_init.o) __glfwPlatformTerminate in libglfw3.a(cocoa_init.o) "_NSZeroPoint", referenced from: +[GLFWContentView initialize] in libglfw3.a(cocoa_window.o) "OBJC_CLASS$_NSApplication", referenced from: OBJC_CLASS$_GLFWApplication in libglfw3.a(cocoa_window.o) "OBJC_CLASS$_NSArray", referenced from: objc-class-ref in libglfw3.a(cocoa_window.o) "OBJC_CLASS$_NSAttributedString", referenced from: objc-class-ref in libglfw3.a(cocoa_window.o) "OBJC_CLASS$_NSAutoreleasePool", referenced from: objc-class-ref in libglfw3.a(cocoa_window.o) objc-class-ref in libglfw3.a(cocoa_init.o) "OBJC_CLASS$_NSBitmapImageRep", referenced from: objc-class-ref in libglfw3.a(cocoa_window.o) "OBJC_CLASS$_NSBundle", referenced from: objc-class-ref in libglfw3.a(cocoa_window.o) "OBJC_CLASS$_NSCursor", referenced from: objc-class-ref in libglfw3.a(cocoa_window.o) "OBJC_CLASS$_NSDate", referenced from: objc-class-ref in libglfw3.a(cocoa_window.o) "OBJC_CLASS$_NSEvent", referenced from: objc-class-ref in libglfw3.a(cocoa_window.o) "OBJC_CLASS$_NSImage", referenced from: objc-class-ref in libglfw3.a(cocoa_window.o) "OBJC_CLASS$_NSMenu", referenced from: objc-class-ref in libglfw3.a(cocoa_window.o) "OBJC_CLASS$_NSMenuItem", referenced from: objc-class-ref in libglfw3.a(cocoa_window.o) "OBJC_CLASS$_NSMutableAttributedString", referenced from: objc-class-ref in libglfw3.a(cocoa_window.o) "OBJC_CLASS$_NSNotificationCenter", referenced from: objc-class-ref in libglfw3.a(cocoa_init.o) "OBJC_CLASS$_NSObject", referenced from: OBJC_CLASS$_GLFWWindowDelegate in libglfw3.a(cocoa_window.o) OBJC_CLASS$_GLFWApplicationDelegate in libglfw3.a(cocoa_window.o) OBJC_CLASS$_GLFWLayoutListener in libglfw3.a(cocoa_init.o) "OBJC_CLASS$_NSOpenGLContext", referenced from: objc-class-ref in libglfw3.a(nsgl_context.o) "OBJC_CLASS$_NSOpenGLPixelFormat", referenced from: objc-class-ref in libglfw3.a(nsgl_context.o) "OBJC_CLASS$_NSPasteboard", referenced from: objc-class-ref in libglfw3.a(cocoa_window.o) "OBJC_CLASS$_NSString", referenced from: objc-class-ref in libglfw3.a(cocoa_window.o) "OBJC_CLASS$_NSThread", referenced from: objc-class-ref in libglfw3.a(cocoa_window.o) "OBJC_CLASS$_NSTrackingArea", referenced from: objc-class-ref in libglfw3.a(cocoa_window.o) "OBJC_CLASS$_NSView", referenced from: OBJC_CLASS$_GLFWContentView in libglfw3.a(cocoa_window.o) "OBJC_CLASS$_NSWindow", referenced from: OBJC_CLASS$_GLFWWindow in libglfw3.a(cocoa_window.o) "OBJC_METACLASS$_NSApplication", referenced from: OBJC_METACLASS$_GLFWApplication in libglfw3.a(cocoa_window.o) "OBJC_METACLASS$_NSObject", referenced from: OBJC_METACLASS$_GLFWWindowDelegate in libglfw3.a(cocoa_window.o) OBJC_METACLASS$_GLFWApplicationDelegate in libglfw3.a(cocoa_window.o) OBJC_METACLASS$_GLFWContentView in libglfw3.a(cocoa_window.o) OBJC_METACLASS$_GLFWWindow in libglfw3.a(cocoa_window.o) OBJC_METACLASS$_GLFWApplication in libglfw3.a(cocoa_window.o) OBJC_METACLASS$_GLFWLayoutListener in libglfw3.a(cocoa_init.o) "OBJC_METACLASS$_NSView", referenced from: OBJC_METACLASS$_GLFWContentView in libglfw3.a(cocoa_window.o) "OBJC_METACLASS$_NSWindow", referenced from: OBJC_METACLASS$_GLFWWindow in libglfw3.a(cocoa_window.o) "_UCKeyTranslate", referenced from: __glfwPlatformGetKeyName in libglfw3.a(cocoa_window.o) "___CFConstantStringClassReference", referenced from: CFString in libglfw3.a(cocoa_window.o) CFString in libglfw3.a(cocoa_window.o) CFString in libglfw3.a(cocoa_window.o) CFString in libglfw3.a(cocoa_window.o) CFString in libglfw3.a(cocoa_window.o) CFString in libglfw3.a(cocoa_window.o) CFString in libglfw3.a(cocoa_window.o) ... "__objc_empty_cache", referenced from: OBJC_CLASS$_GLFWWindowDelegate in libglfw3.a(cocoa_window.o) OBJC_METACLASS$_GLFWWindowDelegate in libglfw3.a(cocoa_window.o) OBJC_METACLASS$_GLFWApplicationDelegate in libglfw3.a(cocoa_window.o) OBJC_CLASS$_GLFWApplicationDelegate in libglfw3.a(cocoa_window.o) OBJC_CLASS$_GLFWContentView in libglfw3.a(cocoa_window.o) OBJC_METACLASS$_GLFWContentView in libglfw3.a(cocoa_window.o) OBJC_METACLASS$_GLFWWindow in libglfw3.a(cocoa_window.o) ... "_kCFAllocatorDefault", referenced from: __glfwPlatformGetKeyName in libglfw3.a(cocoa_window.o) _getProcAddressNSGL in libglfw3.a(nsgl_context.o) __glfwInitJoysticksNS in libglfw3.a(cocoa_joystick.o) "_kCFAllocatorNull", referenced from: __glfwPlatformGetKeyName in libglfw3.a(cocoa_window.o) "_kCFRunLoopDefaultMode", referenced from: __glfwInitJoysticksNS in libglfw3.a(cocoa_joystick.o) "_kCFTypeArrayCallBacks", referenced from: __glfwInitJoysticksNS in libglfw3.a(cocoa_joystick.o) "_kCFTypeDictionaryKeyCallBacks", referenced from: __glfwInitJoysticksNS in libglfw3.a(cocoa_joystick.o) "_kCFTypeDictionaryValueCallBacks", referenced from: __glfwInitJoysticksNS in libglfw3.a(cocoa_joystick.o) "_kIOMasterPortDefault", referenced from: _getDisplayName in libglfw3.a(cocoa_monitor.o) "_objc_msgSend", referenced from: -[GLFWWindowDelegate windowDidResize:] in libglfw3.a(cocoa_window.o) -[GLFWWindowDelegate windowDidMove:] in libglfw3.a(cocoa_window.o) _acquireMonitor in libglfw3.a(cocoa_window.o) __glfwPlatformIconifyWindow in libglfw3.a(cocoa_window.o) -[GLFWApplicationDelegate applicationDidChangeScreenParameters:] in libglfw3.a(cocoa_window.o) -[GLFWApplicationDelegate applicationDidFinishLaunching:] in libglfw3.a(cocoa_window.o) __glfwPlatformPostEmptyEvent in libglfw3.a(cocoa_window.o) ... "_objc_msgSendSuper2", referenced from: -[GLFWWindowDelegate initWithGlfwWindow:] in libglfw3.a(cocoa_window.o) -[GLFWContentView initWithGlfwWindow:] in libglfw3.a(cocoa_window.o) -[GLFWContentView dealloc] in libglfw3.a(cocoa_window.o) -[GLFWContentView updateTrackingAreas] in libglfw3.a(cocoa_window.o) -[GLFWApplication sendEvent:] in libglfw3.a(cocoa_window.o) "_objc_msgSend_stret", referenced from: -[GLFWWindowDelegate windowDidResize:] in libglfw3.a(cocoa_window.o) __glfwPlatformGetWindowPos in libglfw3.a(cocoa_window.o) -[GLFWContentView mouseMoved:] in libglfw3.a(cocoa_window.o) -[GLFWContentView viewDidChangeBackingProperties] in libglfw3.a(cocoa_window.o) -[GLFWContentView updateTrackingAreas] in libglfw3.a(cocoa_window.o) -[GLFWContentView performDragOperation:] in libglfw3.a(cocoa_window.o) -[GLFWContentView firstRectForCharacterRange:actualRange:] in libglfw3.a(cocoa_window.o) ... ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation) Showing first 200 notices only

IntellectualKitty avatar Apr 16 '17 07:04 IntellectualKitty

Thanks for reporting. We'll have a look at it.

scheibel avatar May 05 '17 08:05 scheibel

One difference I see between the setup of our examples and the tests is the build as macOS bundle for the examples. I adopted the build of the tests in the branch tests_as_osx_bundle. If this works, then maybe we can narrow this down or even merge this as a workaround.

scheibel avatar Jan 11 '22 13:01 scheibel