filipwasil / fillwave

Multiplatform C++14 graphics engine
https://filipwasildev.bitbucket.io/
MIT License
23 stars 6 forks source link

OSX example #3

Closed filipwasil closed 9 years ago

filipwasil commented 9 years ago

In order for software to work correctly with glfw3, one should include the Cocoa framework.

-framework Cocoa -framework IOKit -framework CoreVideo

filipwasil commented 9 years ago

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) "_OBJCCLASS$_NSApplication", referenced from: _OBJCCLASS$_GLFWApplication in libglfw3.a(cocoa_window.m.o) "_OBJCCLASS$_NSArray", referenced from: objc-class-ref in libglfw3.a(cocoa_window.m.o) "_OBJCCLASS$_NSAutoreleasePool", referenced from: objc-class-ref in libglfw3.a(cocoa_window.m.o) objc-class-ref in libglfw3.a(cocoa_init.m.o) "_OBJCCLASS$_NSBitmapImageRep", referenced from: objc-class-ref in libglfw3.a(cocoa_window.m.o) "_OBJCCLASS$_NSBundle", referenced from: objc-class-ref in libglfw3.a(cocoa_window.m.o) "_OBJCCLASS$_NSCursor", referenced from: objc-class-ref in libglfw3.a(cocoa_window.m.o) "_OBJCCLASS$_NSDate", referenced from: objc-class-ref in libglfw3.a(cocoa_window.m.o) "_OBJCCLASS$_NSEvent", referenced from: objc-class-ref in libglfw3.a(cocoa_window.m.o) "_OBJCCLASS$_NSImage", referenced from: objc-class-ref in libglfw3.a(cocoa_window.m.o) "_OBJCCLASS$_NSMenu", referenced from: objc-class-ref in libglfw3.a(cocoa_window.m.o) "_OBJCCLASS$_NSMenuItem", referenced from: objc-class-ref in libglfw3.a(cocoa_window.m.o) "_OBJCCLASS$_NSObject", referenced from: _OBJCCLASS$_GLFWWindowDelegate in libglfw3.a(cocoa_window.m.o) _OBJCCLASS$_GLFWApplicationDelegate in libglfw3.a(cocoa_window.m.o) "_OBJCCLASS$_NSOpenGLContext", referenced from: objc-class-ref in libglfw3.a(nsgl_context.m.o) "_OBJCCLASS$_NSOpenGLPixelFormat", referenced from: objc-class-ref in libglfw3.a(nsgl_context.m.o) "_OBJCCLASS$_NSOpenGLView", referenced from: _OBJCCLASS$_GLFWContentView in libglfw3.a(cocoa_window.m.o) "_OBJCCLASS$_NSPasteboard", referenced from: objc-class-ref in libglfw3.a(cocoa_window.m.o) "_OBJCCLASS$_NSScreen", referenced from: objc-class-ref in libglfw3.a(cocoa_monitor.m.o) "_OBJCCLASS$_NSString", referenced from: objc-class-ref in libglfw3.a(cocoa_window.m.o) "_OBJCCLASS$_NSTrackingArea", referenced from: objc-class-ref in libglfw3.a(cocoa_window.m.o) "_OBJCCLASS$_NSWindow", referenced from: _OBJCCLASS$_GLFWWindow in libglfw3.a(cocoa_window.m.o) "_OBJCMETACLASS$_NSApplication", referenced from: _OBJCMETACLASS$_GLFWApplication in libglfw3.a(cocoa_window.m.o) "_OBJCMETACLASS$_NSObject", referenced from: _OBJCMETACLASS$_GLFWWindowDelegate in libglfw3.a(cocoa_window.m.o) _OBJCMETACLASS$_GLFWApplicationDelegate in libglfw3.a(cocoa_window.m.o) _OBJCMETACLASS$_GLFWContentView in libglfw3.a(cocoa_window.m.o) _OBJCMETACLASS$_GLFWWindow in libglfw3.a(cocoa_window.m.o) _OBJCMETACLASS$_GLFWApplication in libglfw3.a(cocoa_window.m.o) "_OBJCMETACLASS$_NSOpenGLView", referenced from: _OBJCMETACLASS$_GLFWContentView in libglfw3.a(cocoa_window.m.o) "_OBJCMETACLASS$_NSWindow", referenced from: _OBJCMETACLASS$_GLFWWindow in libglfw3.a(cocoawindow.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: _OBJCCLASS$_GLFWWindowDelegate in libglfw3.a(cocoa_window.m.o) _OBJCMETACLASS$_GLFWWindowDelegate in libglfw3.a(cocoa_window.m.o) _OBJCMETACLASS$_GLFWApplicationDelegate in libglfw3.a(cocoa_window.m.o) _OBJCCLASS$_GLFWApplicationDelegate in libglfw3.a(cocoa_window.m.o) _OBJCCLASS$_GLFWContentView in libglfw3.a(cocoa_window.m.o) _OBJCMETACLASS$_GLFWContentView in libglfw3.a(cocoa_window.m.o) _OBJCMETACLASS$_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)

filipwasil commented 9 years ago

If you are using the static library, named libglfw3.a, substitute -lglfw3 for -lglfw.

filipwasil commented 9 years ago

This was the case. GLFW should be a shared lib.