Jebbs / DSFML

DSFML is a D binding of SFML
Other
95 stars 23 forks source link

Problem Building on OS X Mavericks #65

Closed jaredonline closed 9 years ago

jaredonline commented 10 years ago

Hey there... I tried following the tutorial (including building my static libraries from SFML by hand), but am running into the following.

Configuration works fine. Generating the Makefile works fine. Here's my CMake setup:

screenshot 2013-11-07 16 21 12 screenshot 2013-11-07 16 21 19

And here's what I hit with bash:

[jared@Adam-Smith DSFML-C Build (master)]$ make
[  5%] Built target dsfml-system
Linking CXX shared library ../../../lib/libdsfml-window.dylib
Undefined symbols for architecture x86_64:
  "_CFArrayCreate", referenced from:
      sf::priv::HIDJoystickManager::HIDJoystickManager() in libsfml-window-s.a(HIDJoystickManager.cpp.o)
  "_CFArrayGetCount", referenced from:
      sf::priv::VideoModeImpl::getFullscreenModes() in libsfml-window-s.a(VideoModeImpl.cpp.o)
      sf::priv::JoystickImpl::open(unsigned int) in libsfml-window-s.a(JoystickImpl.cpp.o)
      sf::priv::HIDInputManager::loadKeyboard(__IOHIDDevice*) in libsfml-window-s.a(HIDInputManager.mm.o)
      sf::priv::HIDInputManager::loadMouse(__IOHIDDevice*) in libsfml-window-s.a(HIDInputManager.mm.o)
      sf::priv::convertSFModeToCGMode(sf::VideoMode) in libsfml-window-s.a(cg_sf_conversion.cpp.o)
  "_CFArrayGetValueAtIndex", referenced from:
      sf::priv::VideoModeImpl::getFullscreenModes() in libsfml-window-s.a(VideoModeImpl.cpp.o)
      sf::priv::JoystickImpl::open(unsigned int) in libsfml-window-s.a(JoystickImpl.cpp.o)
      sf::priv::HIDInputManager::loadKeyboard(__IOHIDDevice*) in libsfml-window-s.a(HIDInputManager.mm.o)
      sf::priv::HIDInputManager::loadMouse(__IOHIDDevice*) in libsfml-window-s.a(HIDInputManager.mm.o)
      sf::priv::convertSFModeToCGMode(sf::VideoMode) in libsfml-window-s.a(cg_sf_conversion.cpp.o)
  "_CFDataGetBytePtr", referenced from:
      sf::priv::HIDInputManager::HIDInputManager() in libsfml-window-s.a(HIDInputManager.mm.o)
  "_CFDictionaryCreateMutable", referenced from:
      sf::priv::HIDInputManager::copyDevicesMask(unsigned int, unsigned int) in libsfml-window-s.a(HIDInputManager.mm.o)
      sf::priv::HIDInputManager::copyDevices(unsigned int, unsigned int) in libsfml-window-s.a(HIDInputManager.mm.o)
  "_CFDictionarySetValue", referenced from:
      sf::priv::HIDInputManager::copyDevicesMask(unsigned int, unsigned int) in libsfml-window-s.a(HIDInputManager.mm.o)
      sf::priv::HIDInputManager::copyDevices(unsigned int, unsigned int) in libsfml-window-s.a(HIDInputManager.mm.o)
  "_CFGetTypeID", referenced from:
      sf::priv::HIDInputManager::getLocationID(__IOHIDDevice*) in libsfml-window-s.a(HIDInputManager.mm.o)
  "_CFNumberCreate", referenced from:
      sf::priv::HIDInputManager::copyDevicesMask(unsigned int, unsigned int) in libsfml-window-s.a(HIDInputManager.mm.o)
      sf::priv::HIDInputManager::copyDevices(unsigned int, unsigned int) in libsfml-window-s.a(HIDInputManager.mm.o)
  "_CFNumberGetTypeID", referenced from:
      sf::priv::HIDInputManager::getLocationID(__IOHIDDevice*) in libsfml-window-s.a(HIDInputManager.mm.o)
  "_CFNumberGetValue", referenced from:
      sf::priv::HIDInputManager::getLocationID(__IOHIDDevice*) in libsfml-window-s.a(HIDInputManager.mm.o)
  "_CFRelease", referenced from:
      sf::priv::VideoModeImpl::getFullscreenModes() in libsfml-window-s.a(VideoModeImpl.cpp.o)
      sf::priv::InputImpl::setMousePosition(sf::Vector2<int> const&) in libsfml-window-s.a(InputImpl.mm.o)
      sf::priv::InputImpl::setMousePosition(sf::Vector2<int> const&, sf::Window const&) in libsfml-window-s.a(InputImpl.mm.o)
      sf::priv::JoystickImpl::isConnected(unsigned int) in libsfml-window-s.a(JoystickImpl.cpp.o)
      sf::priv::JoystickImpl::open(unsigned int) in libsfml-window-s.a(JoystickImpl.cpp.o)
      sf::priv::JoystickImpl::close() in libsfml-window-s.a(JoystickImpl.cpp.o)
      sf::priv::JoystickImpl::update() in libsfml-window-s.a(JoystickImpl.cpp.o)
      ...
  "_CFRetain", referenced from:
      sf::priv::JoystickImpl::open(unsigned int) in libsfml-window-s.a(JoystickImpl.cpp.o)
      sf::priv::HIDInputManager::HIDInputManager() in libsfml-window-s.a(HIDInputManager.mm.o)
      sf::priv::HIDInputManager::loadMouse(__IOHIDDevice*) in libsfml-window-s.a(HIDInputManager.mm.o)
      sf::priv::HIDInputManager::loadKey(__IOHIDElement*) in libsfml-window-s.a(HIDInputManager.mm.o)
      sf::priv::HIDInputManager::loadButton(__IOHIDElement*) in libsfml-window-s.a(HIDInputManager.mm.o)
  "_CFRunLoopGetCurrent", referenced from:
      sf::priv::HIDJoystickManager::~HIDJoystickManager() in libsfml-window-s.a(HIDJoystickManager.cpp.o)
      sf::priv::HIDJoystickManager::HIDJoystickManager() in libsfml-window-s.a(HIDJoystickManager.cpp.o)
      sf::priv::HIDJoystickManager::~HIDJoystickManager() in libsfml-window-s.a(HIDJoystickManager.cpp.o)
  "_CFRunLoopRunInMode", referenced from:
      sf::priv::HIDJoystickManager::getJoystickCount() in libsfml-window-s.a(HIDJoystickManager.cpp.o)
      sf::priv::HIDJoystickManager::update() in libsfml-window-s.a(HIDJoystickManager.cpp.o)
  "_CFSetGetCount", referenced from:
      sf::priv::JoystickImpl::isConnected(unsigned int) in libsfml-window-s.a(JoystickImpl.cpp.o)
      sf::priv::JoystickImpl::open(unsigned int) in libsfml-window-s.a(JoystickImpl.cpp.o)
      sf::priv::JoystickImpl::update() in libsfml-window-s.a(JoystickImpl.cpp.o)
      sf::priv::HIDInputManager::initializeKeyboard() in libsfml-window-s.a(HIDInputManager.mm.o)
      sf::priv::HIDInputManager::initializeMouse() in libsfml-window-s.a(HIDInputManager.mm.o)
      sf::priv::HIDInputManager::copyDevices(unsigned int, unsigned int) in libsfml-window-s.a(HIDInputManager.mm.o)
  "_CFSetGetValues", referenced from:
      sf::priv::JoystickImpl::isConnected(unsigned int) in libsfml-window-s.a(JoystickImpl.cpp.o)
      sf::priv::JoystickImpl::open(unsigned int) in libsfml-window-s.a(JoystickImpl.cpp.o)
      sf::priv::JoystickImpl::update() in libsfml-window-s.a(JoystickImpl.cpp.o)
      sf::priv::HIDInputManager::initializeKeyboard() in libsfml-window-s.a(HIDInputManager.mm.o)
      sf::priv::HIDInputManager::initializeMouse() in libsfml-window-s.a(HIDInputManager.mm.o)
  "_CFStringCompare", referenced from:
      sf::priv::modeBitsPerPixel(CGDisplayMode*) in libsfml-window-s.a(cg_sf_conversion.cpp.o)
      sf::priv::displayBitsPerPixel(unsigned int) in libsfml-window-s.a(cg_sf_conversion.cpp.o)
      sf::priv::convertCGModeToSFMode(CGDisplayMode*) in libsfml-window-s.a(cg_sf_conversion.cpp.o)
  "_CGDisplayCopyAllDisplayModes", referenced from:
      sf::priv::VideoModeImpl::getFullscreenModes() in libsfml-window-s.a(VideoModeImpl.cpp.o)
      sf::priv::convertSFModeToCGMode(sf::VideoMode) in libsfml-window-s.a(cg_sf_conversion.cpp.o)
  "_CGDisplayCopyDisplayMode", referenced from:
      sf::priv::displayBitsPerPixel(unsigned int) in libsfml-window-s.a(cg_sf_conversion.cpp.o)
  "_CGDisplayModeCopyPixelEncoding", referenced from:
      sf::priv::modeBitsPerPixel(CGDisplayMode*) in libsfml-window-s.a(cg_sf_conversion.cpp.o)
      sf::priv::displayBitsPerPixel(unsigned int) in libsfml-window-s.a(cg_sf_conversion.cpp.o)
      sf::priv::convertCGModeToSFMode(CGDisplayMode*) in libsfml-window-s.a(cg_sf_conversion.cpp.o)
  "_CGDisplayModeGetHeight", referenced from:
      sf::priv::convertCGModeToSFMode(CGDisplayMode*) in libsfml-window-s.a(cg_sf_conversion.cpp.o)
  "_CGDisplayModeGetWidth", referenced from:
      sf::priv::convertCGModeToSFMode(CGDisplayMode*) in libsfml-window-s.a(cg_sf_conversion.cpp.o)
  "_CGDisplayModeRelease", referenced from:
      sf::priv::displayBitsPerPixel(unsigned int) in libsfml-window-s.a(cg_sf_conversion.cpp.o)
  "_CGDisplayPixelsHigh", referenced from:
      sf::priv::VideoModeImpl::getDesktopMode() in libsfml-window-s.a(VideoModeImpl.cpp.o)
      -[SFWindowController screenHeight] in libsfml-window-s.a(SFWindowController.mm.o)
  "_CGDisplayPixelsWide", referenced from:
      sf::priv::VideoModeImpl::getDesktopMode() in libsfml-window-s.a(VideoModeImpl.cpp.o)
  "_CGEventCreateMouseEvent", referenced from:
      sf::priv::InputImpl::setMousePosition(sf::Vector2<int> const&) in libsfml-window-s.a(InputImpl.mm.o)
      sf::priv::InputImpl::setMousePosition(sf::Vector2<int> const&, sf::Window const&) in libsfml-window-s.a(InputImpl.mm.o)
  "_CGEventPost", referenced from:
      sf::priv::InputImpl::setMousePosition(sf::Vector2<int> const&) in libsfml-window-s.a(InputImpl.mm.o)
      sf::priv::InputImpl::setMousePosition(sf::Vector2<int> const&, sf::Window const&) in libsfml-window-s.a(InputImpl.mm.o)
  "_CGLEnable", referenced from:
      -[SFWindowController applyContext:] in libsfml-window-s.a(SFWindowController.mm.o)
  "_CGLSetParameter", referenced from:
      -[SFWindowController applyContext:] in libsfml-window-s.a(SFWindowController.mm.o)
  "_CGMainDisplayID", referenced from:
      sf::priv::VideoModeImpl::getFullscreenModes() in libsfml-window-s.a(VideoModeImpl.cpp.o)
      sf::priv::VideoModeImpl::getDesktopMode() in libsfml-window-s.a(VideoModeImpl.cpp.o)
      sf::priv::convertSFModeToCGMode(sf::VideoMode) in libsfml-window-s.a(cg_sf_conversion.cpp.o)
  "_CGWindowLevelForKey", referenced from:
      -[SFWindowController initWithMode:andStyle:] in libsfml-window-s.a(SFWindowController.mm.o)
  "_GetCurrentProcess", referenced from:
      sf::priv::WindowImplCocoa::WindowImplCocoa(sf::VideoMode, sf::String const&, unsigned long, sf::ContextSettings const&) in libsfml-window-s.a(WindowImplCocoa.mm.o)
      sf::priv::WindowImplCocoa::WindowImplCocoa(sf::VideoMode, sf::String const&, unsigned long, sf::ContextSettings const&) in libsfml-window-s.a(WindowImplCocoa.mm.o)
      sf::priv::WindowImplCocoa::setUpProcess() in libsfml-window-s.a(WindowImplCocoa.mm.o)
  "_IOHIDDeviceCopyMatchingElements", referenced from:
      sf::priv::JoystickImpl::open(unsigned int) in libsfml-window-s.a(JoystickImpl.cpp.o)
      sf::priv::HIDInputManager::loadKeyboard(__IOHIDDevice*) in libsfml-window-s.a(HIDInputManager.mm.o)
      sf::priv::HIDInputManager::loadMouse(__IOHIDDevice*) in libsfml-window-s.a(HIDInputManager.mm.o)
  "_IOHIDDeviceGetProperty", referenced from:
      sf::priv::HIDInputManager::getLocationID(__IOHIDDevice*) in libsfml-window-s.a(HIDInputManager.mm.o)
  "_IOHIDDeviceGetValue", referenced from:
      sf::priv::JoystickImpl::update() in libsfml-window-s.a(JoystickImpl.cpp.o)
      sf::priv::HIDInputManager::isKeyPressed(sf::Keyboard::Key) in libsfml-window-s.a(HIDInputManager.mm.o)
      sf::priv::HIDInputManager::isMouseButtonPressed(sf::Mouse::Button) in libsfml-window-s.a(HIDInputManager.mm.o)
  "_IOHIDElementGetDevice", referenced from:
      sf::priv::JoystickImpl::update() in libsfml-window-s.a(JoystickImpl.cpp.o)
      sf::priv::HIDInputManager::isKeyPressed(sf::Keyboard::Key) in libsfml-window-s.a(HIDInputManager.mm.o)
      sf::priv::HIDInputManager::isMouseButtonPressed(sf::Mouse::Button) in libsfml-window-s.a(HIDInputManager.mm.o)
  "_IOHIDElementGetPhysicalMax", referenced from:
      sf::priv::JoystickImpl::update() in libsfml-window-s.a(JoystickImpl.cpp.o)
  "_IOHIDElementGetPhysicalMin", referenced from:
      sf::priv::JoystickImpl::update() in libsfml-window-s.a(JoystickImpl.cpp.o)
  "_IOHIDElementGetType", referenced from:
      sf::priv::JoystickImpl::open(unsigned int) in libsfml-window-s.a(JoystickImpl.cpp.o)
  "_IOHIDElementGetUsage", referenced from:
      sf::priv::JoystickImpl::open(unsigned int) in libsfml-window-s.a(JoystickImpl.cpp.o)
      (anonymous namespace)::JoystickButtonSortPredicate(__IOHIDElement*, __IOHIDElement*) in libsfml-window-s.a(JoystickImpl.cpp.o)
      sf::priv::HIDInputManager::loadMouse(__IOHIDDevice*) in libsfml-window-s.a(HIDInputManager.mm.o)
      sf::priv::HIDInputManager::loadKey(__IOHIDElement*) in libsfml-window-s.a(HIDInputManager.mm.o)
      sf::priv::HIDInputManager::loadButton(__IOHIDElement*) in libsfml-window-s.a(HIDInputManager.mm.o)
  "_IOHIDElementGetUsagePage", referenced from:
      sf::priv::HIDInputManager::loadKeyboard(__IOHIDDevice*) in libsfml-window-s.a(HIDInputManager.mm.o)
      sf::priv::HIDInputManager::loadMouse(__IOHIDDevice*) in libsfml-window-s.a(HIDInputManager.mm.o)
  "_IOHIDManagerClose", referenced from:
      sf::priv::HIDJoystickManager::~HIDJoystickManager() in libsfml-window-s.a(HIDJoystickManager.cpp.o)
      sf::priv::HIDJoystickManager::~HIDJoystickManager() in libsfml-window-s.a(HIDJoystickManager.cpp.o)
  "_IOHIDManagerCopyDevices", referenced from:
      sf::priv::HIDInputManager::copyDevices(unsigned int, unsigned int) in libsfml-window-s.a(HIDInputManager.mm.o)
      sf::priv::HIDJoystickManager::copyJoysticks() in libsfml-window-s.a(HIDJoystickManager.cpp.o)
  "_IOHIDManagerCreate", referenced from:
      sf::priv::HIDInputManager::HIDInputManager() in libsfml-window-s.a(HIDInputManager.mm.o)
      sf::priv::HIDJoystickManager::HIDJoystickManager() in libsfml-window-s.a(HIDJoystickManager.cpp.o)
  "_IOHIDManagerOpen", referenced from:
      sf::priv::HIDInputManager::HIDInputManager() in libsfml-window-s.a(HIDInputManager.mm.o)
      sf::priv::HIDJoystickManager::HIDJoystickManager() in libsfml-window-s.a(HIDJoystickManager.cpp.o)
  "_IOHIDManagerRegisterDeviceMatchingCallback", referenced from:
      sf::priv::HIDJoystickManager::~HIDJoystickManager() in libsfml-window-s.a(HIDJoystickManager.cpp.o)
      sf::priv::HIDJoystickManager::HIDJoystickManager() in libsfml-window-s.a(HIDJoystickManager.cpp.o)
      sf::priv::HIDJoystickManager::~HIDJoystickManager() in libsfml-window-s.a(HIDJoystickManager.cpp.o)
  "_IOHIDManagerRegisterDeviceRemovalCallback", referenced from:
      sf::priv::HIDJoystickManager::~HIDJoystickManager() in libsfml-window-s.a(HIDJoystickManager.cpp.o)
      sf::priv::HIDJoystickManager::HIDJoystickManager() in libsfml-window-s.a(HIDJoystickManager.cpp.o)
      sf::priv::HIDJoystickManager::~HIDJoystickManager() in libsfml-window-s.a(HIDJoystickManager.cpp.o)
  "_IOHIDManagerScheduleWithRunLoop", referenced from:
      sf::priv::HIDJoystickManager::HIDJoystickManager() in libsfml-window-s.a(HIDJoystickManager.cpp.o)
  "_IOHIDManagerSetDeviceMatching", referenced from:
      sf::priv::HIDInputManager::copyDevices(unsigned int, unsigned int) in libsfml-window-s.a(HIDInputManager.mm.o)
  "_IOHIDManagerSetDeviceMatchingMultiple", referenced from:
      sf::priv::HIDJoystickManager::HIDJoystickManager() in libsfml-window-s.a(HIDJoystickManager.cpp.o)
  "_IOHIDManagerUnscheduleFromRunLoop", referenced from:
      sf::priv::HIDJoystickManager::~HIDJoystickManager() in libsfml-window-s.a(HIDJoystickManager.cpp.o)
      sf::priv::HIDJoystickManager::~HIDJoystickManager() in libsfml-window-s.a(HIDJoystickManager.cpp.o)
  "_IOHIDValueGetIntegerValue", referenced from:
      sf::priv::JoystickImpl::update() in libsfml-window-s.a(JoystickImpl.cpp.o)
      sf::priv::HIDInputManager::isKeyPressed(sf::Keyboard::Key) in libsfml-window-s.a(HIDInputManager.mm.o)
      sf::priv::HIDInputManager::isMouseButtonPressed(sf::Mouse::Button) in libsfml-window-s.a(HIDInputManager.mm.o)
  "_IOHIDValueGetScaledValue", referenced from:
      sf::priv::JoystickImpl::update() in libsfml-window-s.a(JoystickImpl.cpp.o)
  "_LMGetKbdType", referenced from:
      sf::priv::HIDInputManager::loadKey(__IOHIDElement*) in libsfml-window-s.a(HIDInputManager.mm.o)
  "_NSApp", referenced from:
      +[SFApplication processEvent] in libsfml-window-s.a(SFApplication.m.o)
      ensureModifiersStateIsInitilized() in libsfml-window-s.a(SFKeyboardModifiersHelper.mm.o)
      processOneModifier(unsigned long, unsigned long, signed char&, sf::Keyboard::Key, sf::priv::WindowImplCocoa&) in libsfml-window-s.a(SFKeyboardModifiersHelper.mm.o)
  "_NSCalibratedRGBColorSpace", referenced from:
      -[SFWindowController setIconTo:by:with:] in libsfml-window-s.a(SFWindowController.mm.o)
  "_NSDefaultRunLoopMode", referenced from:
      +[SFApplication processEvent] in libsfml-window-s.a(SFApplication.m.o)
  "_NSEqualSizes", referenced from:
      -[SFOpenGLView computeGlobalPositionOfRelativePoint:] in libsfml-window-s.a(SFOpenGLView.mm.o)
      -[SFOpenGLView cursorPositionFromEvent:] in libsfml-window-s.a(SFOpenGLView.mm.o)
  "_NSPointInRect", referenced from:
      -[SFOpenGLView isMouseInside] in libsfml-window-s.a(SFOpenGLView.mm.o)
  "_NSViewFrameDidChangeNotification", referenced from:
      -[SFOpenGLView initWithFrame:] in libsfml-window-s.a(SFOpenGLView.mm.o)
  "_NSZeroRect", referenced from:
      -[SFOpenGLView initWithFrame:] in libsfml-window-s.a(SFOpenGLView.mm.o)
  "_NSZeroSize", referenced from:
      -[SFOpenGLView initWithFrame:] in libsfml-window-s.a(SFOpenGLView.mm.o)
      -[SFOpenGLView computeGlobalPositionOfRelativePoint:] in libsfml-window-s.a(SFOpenGLView.mm.o)
      -[SFOpenGLView cursorPositionFromEvent:] in libsfml-window-s.a(SFOpenGLView.mm.o)
  "_OBJC_CLASS_$_NSApplication", referenced from:
      _OBJC_CLASS_$_SFApplication in libsfml-window-s.a(SFApplication.m.o)
  "_OBJC_CLASS_$_NSArray", referenced from:
      objc-class-ref in libsfml-window-s.a(SFOpenGLView.mm.o)
  "_OBJC_CLASS_$_NSAutoreleasePool", referenced from:
      objc-class-ref in libsfml-window-s.a(AutoreleasePoolWrapper.mm.o)
  "_OBJC_CLASS_$_NSBitmapImageRep", referenced from:
      objc-class-ref in libsfml-window-s.a(SFWindowController.mm.o)
  "_OBJC_CLASS_$_NSCursor", referenced from:
      objc-class-ref in libsfml-window-s.a(SFViewController.mm.o)
      objc-class-ref in libsfml-window-s.a(SFWindowController.mm.o)
  "_OBJC_CLASS_$_NSDate", referenced from:
      objc-class-ref in libsfml-window-s.a(SFApplication.m.o)
  "_OBJC_CLASS_$_NSEvent", referenced from:
      objc-class-ref in libsfml-window-s.a(InputImpl.mm.o)
  "_OBJC_CLASS_$_NSImage", referenced from:
      objc-class-ref in libsfml-window-s.a(SFWindowController.mm.o)
  "_OBJC_CLASS_$_NSMenu", referenced from:
      objc-class-ref in libsfml-window-s.a(SFWindowController.mm.o)
  "_OBJC_CLASS_$_NSNotificationCenter", referenced from:
      objc-class-ref in libsfml-window-s.a(SFOpenGLView.mm.o)
  "_OBJC_CLASS_$_NSObject", referenced from:
      _OBJC_CLASS_$_SFViewController in libsfml-window-s.a(SFViewController.mm.o)
  "_OBJC_CLASS_$_NSOpenGLContext", referenced from:
      objc-class-ref in libsfml-window-s.a(SFContext.mm.o)
  "_OBJC_CLASS_$_NSOpenGLPixelFormat", referenced from:
      objc-class-ref in libsfml-window-s.a(SFContext.mm.o)
  "_OBJC_CLASS_$_NSOpenGLView", referenced from:
      _OBJC_CLASS_$_SFOpenGLView in libsfml-window-s.a(SFOpenGLView.mm.o)
      objc-class-ref in libsfml-window-s.a(SFContext.mm.o)
  "_OBJC_CLASS_$_NSResponder", referenced from:
      _OBJC_CLASS_$_SFSilentResponder in libsfml-window-s.a(SFSilentResponder.m.o)
      _OBJC_CLASS_$_SFWindowController in libsfml-window-s.a(SFWindowController.mm.o)
  "_OBJC_CLASS_$_NSString", referenced from:
      objc-class-ref in libsfml-window-s.a(cpp_objc_conversion.mm.o)
  "_OBJC_CLASS_$_NSTextView", referenced from:
      objc-class-ref in libsfml-window-s.a(SFOpenGLView.mm.o)
  "_OBJC_CLASS_$_NSThread", referenced from:
      objc-class-ref in libsfml-window-s.a(SFViewController.mm.o)
      objc-class-ref in libsfml-window-s.a(SFWindowController.mm.o)
  "_OBJC_CLASS_$_NSTrackingArea", referenced from:
      objc-class-ref in libsfml-window-s.a(SFOpenGLView.mm.o)
  "_OBJC_CLASS_$_NSView", referenced from:
      objc-class-ref in libsfml-window-s.a(InputImpl.mm.o)
      objc-class-ref in libsfml-window-s.a(WindowImplCocoa.mm.o)
  "_OBJC_CLASS_$_NSWindow", referenced from:
      objc-class-ref in libsfml-window-s.a(InputImpl.mm.o)
      objc-class-ref in libsfml-window-s.a(WindowImplCocoa.mm.o)
      objc-class-ref in libsfml-window-s.a(SFContext.mm.o)
      _OBJC_CLASS_$_SFWindow in libsfml-window-s.a(SFWindow.m.o)
  "_OBJC_METACLASS_$_NSApplication", referenced from:
      _OBJC_METACLASS_$_SFApplication in libsfml-window-s.a(SFApplication.m.o)
  "_OBJC_METACLASS_$_NSObject", referenced from:
      _OBJC_METACLASS_$_SFOpenGLView in libsfml-window-s.a(SFOpenGLView.mm.o)
      _OBJC_METACLASS_$_SFApplication in libsfml-window-s.a(SFApplication.m.o)
      _OBJC_METACLASS_$_SFSilentResponder in libsfml-window-s.a(SFSilentResponder.m.o)
      _OBJC_METACLASS_$_SFViewController in libsfml-window-s.a(SFViewController.mm.o)
      _OBJC_METACLASS_$_SFWindowController in libsfml-window-s.a(SFWindowController.mm.o)
      _OBJC_METACLASS_$_SFWindow in libsfml-window-s.a(SFWindow.m.o)
  "_OBJC_METACLASS_$_NSOpenGLView", referenced from:
      _OBJC_METACLASS_$_SFOpenGLView in libsfml-window-s.a(SFOpenGLView.mm.o)
  "_OBJC_METACLASS_$_NSResponder", referenced from:
      _OBJC_METACLASS_$_SFSilentResponder in libsfml-window-s.a(SFSilentResponder.m.o)
      _OBJC_METACLASS_$_SFWindowController in libsfml-window-s.a(SFWindowController.mm.o)
  "_OBJC_METACLASS_$_NSWindow", referenced from:
      _OBJC_METACLASS_$_SFWindow in libsfml-window-s.a(SFWindow.m.o)
  "_SetFrontProcess", referenced from:
      sf::priv::WindowImplCocoa::WindowImplCocoa(sf::VideoMode, sf::String const&, unsigned long, sf::ContextSettings const&) in libsfml-window-s.a(WindowImplCocoa.mm.o)
      sf::priv::WindowImplCocoa::WindowImplCocoa(sf::VideoMode, sf::String const&, unsigned long, sf::ContextSettings const&) in libsfml-window-s.a(WindowImplCocoa.mm.o)
      sf::priv::WindowImplCocoa::setUpProcess() in libsfml-window-s.a(WindowImplCocoa.mm.o)
  "_TISCopyCurrentKeyboardLayoutInputSource", referenced from:
      sf::priv::HIDInputManager::HIDInputManager() in libsfml-window-s.a(HIDInputManager.mm.o)
  "_TISGetInputSourceProperty", referenced from:
      sf::priv::HIDInputManager::HIDInputManager() in libsfml-window-s.a(HIDInputManager.mm.o)
  "_TransformProcessType", referenced from:
      sf::priv::WindowImplCocoa::WindowImplCocoa(sf::VideoMode, sf::String const&, unsigned long, sf::ContextSettings const&) in libsfml-window-s.a(WindowImplCocoa.mm.o)
      sf::priv::WindowImplCocoa::WindowImplCocoa(sf::VideoMode, sf::String const&, unsigned long, sf::ContextSettings const&) in libsfml-window-s.a(WindowImplCocoa.mm.o)
      sf::priv::WindowImplCocoa::setUpProcess() in libsfml-window-s.a(WindowImplCocoa.mm.o)
  "_UCKeyTranslate", referenced from:
      sf::priv::HIDInputManager::loadKey(__IOHIDElement*) in libsfml-window-s.a(HIDInputManager.mm.o)
  "___CFConstantStringClassReference", referenced from:
      CFString in libsfml-window-s.a(SFOpenGLView.mm.o)
      CFString in libsfml-window-s.a(HIDInputManager.mm.o)
      CFString in libsfml-window-s.a(HIDInputManager.mm.o)
      CFString in libsfml-window-s.a(HIDInputManager.mm.o)
      CFString in libsfml-window-s.a(cg_sf_conversion.cpp.o)
      CFString in libsfml-window-s.a(cg_sf_conversion.cpp.o)
      CFString in libsfml-window-s.a(cg_sf_conversion.cpp.o)
      ...
  "__objc_empty_cache", referenced from:
      _OBJC_CLASS_$_SFOpenGLView in libsfml-window-s.a(SFOpenGLView.mm.o)
      _OBJC_METACLASS_$_SFOpenGLView in libsfml-window-s.a(SFOpenGLView.mm.o)
      _OBJC_CLASS_$_SFApplication in libsfml-window-s.a(SFApplication.m.o)
      _OBJC_METACLASS_$_SFApplication in libsfml-window-s.a(SFApplication.m.o)
      _OBJC_METACLASS_$_SFSilentResponder in libsfml-window-s.a(SFSilentResponder.m.o)
      _OBJC_CLASS_$_SFSilentResponder in libsfml-window-s.a(SFSilentResponder.m.o)
      _OBJC_CLASS_$_SFViewController in libsfml-window-s.a(SFViewController.mm.o)
      ...
  "__objc_empty_vtable", referenced from:
      _OBJC_CLASS_$_SFOpenGLView in libsfml-window-s.a(SFOpenGLView.mm.o)
      _OBJC_METACLASS_$_SFOpenGLView in libsfml-window-s.a(SFOpenGLView.mm.o)
      _OBJC_CLASS_$_SFApplication in libsfml-window-s.a(SFApplication.m.o)
      _OBJC_METACLASS_$_SFApplication in libsfml-window-s.a(SFApplication.m.o)
      _OBJC_METACLASS_$_SFSilentResponder in libsfml-window-s.a(SFSilentResponder.m.o)
      _OBJC_CLASS_$_SFSilentResponder in libsfml-window-s.a(SFSilentResponder.m.o)
      _OBJC_CLASS_$_SFViewController in libsfml-window-s.a(SFViewController.mm.o)
      ...
  "_glEnable", referenced from:
      sf::priv::GlContext::globalInit() in libsfml-window-s.a(GlContext.cpp.o)
      sf::priv::GlContext::initialize() in libsfml-window-s.a(GlContext.cpp.o)
      (anonymous namespace)::getInternalContext() in libsfml-window-s.a(GlContext.cpp.o)
      sf::priv::GlContext::create() in libsfml-window-s.a(GlContext.cpp.o)
      sf::priv::GlContext::create(sf::ContextSettings const&, sf::priv::WindowImpl const*, unsigned int) in libsfml-window-s.a(GlContext.cpp.o)
      sf::priv::GlContext::create(sf::ContextSettings const&, unsigned int, unsigned int) in libsfml-window-s.a(GlContext.cpp.o)
  "_glGetString", referenced from:
      sf::priv::GlContext::globalInit() in libsfml-window-s.a(GlContext.cpp.o)
      sf::priv::GlContext::initialize() in libsfml-window-s.a(GlContext.cpp.o)
      (anonymous namespace)::getInternalContext() in libsfml-window-s.a(GlContext.cpp.o)
      sf::priv::GlContext::create() in libsfml-window-s.a(GlContext.cpp.o)
      sf::priv::GlContext::create(sf::ContextSettings const&, sf::priv::WindowImpl const*, unsigned int) in libsfml-window-s.a(GlContext.cpp.o)
      sf::priv::GlContext::create(sf::ContextSettings const&, unsigned int, unsigned int) in libsfml-window-s.a(GlContext.cpp.o)
  "_kCFAllocatorDefault", referenced from:
      sf::priv::HIDInputManager::copyDevicesMask(unsigned int, unsigned int) in libsfml-window-s.a(HIDInputManager.mm.o)
      sf::priv::HIDInputManager::HIDInputManager() in libsfml-window-s.a(HIDInputManager.mm.o)
      sf::priv::HIDInputManager::copyDevices(unsigned int, unsigned int) in libsfml-window-s.a(HIDInputManager.mm.o)
      sf::priv::HIDJoystickManager::HIDJoystickManager() in libsfml-window-s.a(HIDJoystickManager.cpp.o)
  "_kCFTypeDictionaryKeyCallBacks", referenced from:
      sf::priv::HIDInputManager::copyDevicesMask(unsigned int, unsigned int) in libsfml-window-s.a(HIDInputManager.mm.o)
      sf::priv::HIDInputManager::copyDevices(unsigned int, unsigned int) in libsfml-window-s.a(HIDInputManager.mm.o)
  "_kCFTypeDictionaryValueCallBacks", referenced from:
      sf::priv::HIDInputManager::copyDevicesMask(unsigned int, unsigned int) in libsfml-window-s.a(HIDInputManager.mm.o)
      sf::priv::HIDInputManager::copyDevices(unsigned int, unsigned int) in libsfml-window-s.a(HIDInputManager.mm.o)
  "_kTISPropertyUnicodeKeyLayoutData", referenced from:
      sf::priv::HIDInputManager::HIDInputManager() in libsfml-window-s.a(HIDInputManager.mm.o)
  "_objc_enumerationMutation", referenced from:
      sf::priv::getSFOpenGLViewFromSFMLWindow(sf::Window const&) in libsfml-window-s.a(InputImpl.mm.o)
  "_objc_msgSend", referenced from:
      sf::priv::getSFOpenGLViewFromSFMLWindow(sf::Window const&) in libsfml-window-s.a(InputImpl.mm.o)
      sf::priv::InputImpl::getMousePosition() in libsfml-window-s.a(InputImpl.mm.o)
      sf::priv::InputImpl::getMousePosition(sf::Window const&) in libsfml-window-s.a(InputImpl.mm.o)
      sf::priv::InputImpl::setMousePosition(sf::Vector2<int> const&, sf::Window const&) in libsfml-window-s.a(InputImpl.mm.o)
      -[SFOpenGLView initWithFrame:] in libsfml-window-s.a(SFOpenGLView.mm.o)
      -[SFOpenGLView enterFullscreen] in libsfml-window-s.a(SFOpenGLView.mm.o)
      -[SFOpenGLView exitFullscreen] in libsfml-window-s.a(SFOpenGLView.mm.o)
      ...
  "_objc_msgSendSuper2", referenced from:
      -[SFOpenGLView initWithFrame:] in libsfml-window-s.a(SFOpenGLView.mm.o)
      -[SFOpenGLView dealloc] in libsfml-window-s.a(SFOpenGLView.mm.o)
      -[SFApplication sendEvent:] in libsfml-window-s.a(SFApplication.m.o)
      -[SFViewController initWithView:] in libsfml-window-s.a(SFViewController.mm.o)
      -[SFViewController dealloc] in libsfml-window-s.a(SFViewController.mm.o)
      -[SFWindowController initWithWindow:] in libsfml-window-s.a(SFWindowController.mm.o)
      -[SFWindowController initWithMode:andStyle:] in libsfml-window-s.a(SFWindowController.mm.o)
      ...
  "_objc_msgSend_fixup", referenced from:
      l_objc_msgSend_fixup_class in libsfml-window-s.a(InputImpl.mm.o)
      l_objc_msgSend_fixup_isKindOfClass_ in libsfml-window-s.a(InputImpl.mm.o)
      l_objc_msgSend_fixup_alloc in libsfml-window-s.a(SFOpenGLView.mm.o)
      l_objc_msgSend_fixup_release in libsfml-window-s.a(SFOpenGLView.mm.o)
      l_objc_msgSend_fixup_length in libsfml-window-s.a(SFOpenGLView.mm.o)
      l_objc_msgSend_fixup_class in libsfml-window-s.a(WindowImplCocoa.mm.o)
      l_objc_msgSend_fixup_isKindOfClass_ in libsfml-window-s.a(WindowImplCocoa.mm.o)
      ...
  "_objc_msgSend_stret", referenced from:
      -[SFOpenGLView initWithFrame:] in libsfml-window-s.a(SFOpenGLView.mm.o)
      -[SFOpenGLView computeGlobalPositionOfRelativePoint:] in libsfml-window-s.a(SFOpenGLView.mm.o)
      -[SFOpenGLView frameDidChange:] in libsfml-window-s.a(SFOpenGLView.mm.o)
      -[SFOpenGLView isMouseInside] in libsfml-window-s.a(SFOpenGLView.mm.o)
      -[SFOpenGLView cursorPositionFromEvent:] in libsfml-window-s.a(SFOpenGLView.mm.o)
      -[SFViewController initWithView:] in libsfml-window-s.a(SFViewController.mm.o)
      -[SFViewController size] in libsfml-window-s.a(SFViewController.mm.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[2]: *** [lib/libdsfml-window.2.0.dylib] Error 1
make[1]: *** [src/SFML/Window/CMakeFiles/dsfml-window.dir/all] Error 2
make: *** [all] Error 2

Any help would be had [=

Jebbs commented 10 years ago

Hey there!

Unfortunately I do not have access to a mac(though I really should for testing purposes), but I will definitely look into this and help you out. I have a couple of things you could try that might help to pin point what's going on. Not much, but it's a start.

  1. Try building with SFML 2.0 instead of SFML 2.1. I haven't had a chance to update/test things with SFML 2.1, so for the time being it should be built witn SFML 2.0. I doubt this would be the source of your problem, but it wouldn't hurt to try it out.
  2. Try building CSFML. DSFML-C is based on CSFML, so if you can build that, then the problem lies in the CMake files.

Hope that helps! Let me know what happens.

jaredonline commented 10 years ago

I built SFML 2.0 by hand and it worked just fine. I'm unable to get CSFML to build. It looks like the same set of errors. Should I go bother them?

jaredonline commented 10 years ago

I was able to get CSFML to build now. Here's what I'm getting now:

[jared@Adam-Smith DSFML-C-clang (master)]$ make
Scanning dependencies of target dsfml-system
[  2%] Building CXX object src/SFML/System/CMakeFiles/dsfml-system.dir/Clock.cpp.o
[  5%] Building CXX object src/SFML/System/CMakeFiles/dsfml-system.dir/Err.cpp.o
Linking CXX shared library ../../../lib/libdsfml-system.dylib
[  5%] Built target dsfml-system
Scanning dependencies of target dsfml-window
[  7%] Building CXX object src/SFML/Window/CMakeFiles/dsfml-window.dir/Context.cpp.o
[ 10%] Building CXX object src/SFML/Window/CMakeFiles/dsfml-window.dir/Err.cpp.o
[ 12%] Building CXX object src/SFML/Window/CMakeFiles/dsfml-window.dir/Joystick.cpp.o
[ 15%] Building CXX object src/SFML/Window/CMakeFiles/dsfml-window.dir/Keyboard.cpp.o
[ 17%] Building CXX object src/SFML/Window/CMakeFiles/dsfml-window.dir/Mouse.cpp.o
[ 20%] Building CXX object src/SFML/Window/CMakeFiles/dsfml-window.dir/VideoMode.cpp.o
[ 23%] Building CXX object src/SFML/Window/CMakeFiles/dsfml-window.dir/Window.cpp.o
Linking CXX shared library ../../../lib/libdsfml-window.dylib
[ 23%] Built target dsfml-window
Scanning dependencies of target dsfml-network
[ 25%] Building CXX object src/SFML/Network/CMakeFiles/dsfml-network.dir/Err.cpp.o
[ 28%] Building CXX object src/SFML/Network/CMakeFiles/dsfml-network.dir/Ftp.cpp.o
[ 30%] Building CXX object src/SFML/Network/CMakeFiles/dsfml-network.dir/Http.cpp.o
[ 33%] Building CXX object src/SFML/Network/CMakeFiles/dsfml-network.dir/IpAddress.cpp.o
[ 35%] Building CXX object src/SFML/Network/CMakeFiles/dsfml-network.dir/Packet.cpp.o
[ 38%] Building CXX object src/SFML/Network/CMakeFiles/dsfml-network.dir/SocketSelector.cpp.o
[ 41%] Building CXX object src/SFML/Network/CMakeFiles/dsfml-network.dir/TcpListener.cpp.o
[ 43%] Building CXX object src/SFML/Network/CMakeFiles/dsfml-network.dir/TcpSocket.cpp.o
[ 46%] Building CXX object src/SFML/Network/CMakeFiles/dsfml-network.dir/UdpSocket.cpp.o
Linking CXX shared library ../../../lib/libdsfml-network.dylib
[ 46%] Built target dsfml-network
Scanning dependencies of target dsfml-graphics
[ 48%] Building CXX object src/SFML/Graphics/CMakeFiles/dsfml-graphics.dir/Err.cpp.o
[ 51%] Building CXX object src/SFML/Graphics/CMakeFiles/dsfml-graphics.dir/Font.cpp.o
[ 53%] Building CXX object src/SFML/Graphics/CMakeFiles/dsfml-graphics.dir/Image.cpp.o
[ 56%] Building CXX object src/SFML/Graphics/CMakeFiles/dsfml-graphics.dir/RenderTexture.cpp.o
[ 58%] Building CXX object src/SFML/Graphics/CMakeFiles/dsfml-graphics.dir/RenderWindow.cpp.o
[ 61%] Building CXX object src/SFML/Graphics/CMakeFiles/dsfml-graphics.dir/Shader.cpp.o
[ 64%] Building CXX object src/SFML/Graphics/CMakeFiles/dsfml-graphics.dir/Texture.cpp.o
[ 66%] Building CXX object src/SFML/Graphics/CMakeFiles/dsfml-graphics.dir/Transform.cpp.o
[ 69%] Building CXX object src/SFML/Graphics/CMakeFiles/dsfml-graphics.dir/View.cpp.o
Linking CXX shared library ../../../lib/libdsfml-graphics.dylib
[ 69%] Built target dsfml-graphics
Scanning dependencies of target dsfml-audio
[ 71%] Building CXX object src/SFML/Audio/CMakeFiles/dsfml-audio.dir/ALCheck.cpp.o
[ 74%] Building CXX object src/SFML/Audio/CMakeFiles/dsfml-audio.dir/AudioDevice.cpp.o
[ 76%] Building CXX object src/SFML/Audio/CMakeFiles/dsfml-audio.dir/Err.cpp.o
[ 79%] Building CXX object src/SFML/Audio/CMakeFiles/dsfml-audio.dir/Listener.cpp.o
[ 82%] Building CXX object src/SFML/Audio/CMakeFiles/dsfml-audio.dir/Sound.cpp.o
[ 84%] Building CXX object src/SFML/Audio/CMakeFiles/dsfml-audio.dir/SoundBuffer.cpp.o
[ 87%] Building CXX object src/SFML/Audio/CMakeFiles/dsfml-audio.dir/sfSoundFile.cpp.o
[ 89%] Building CXX object src/SFML/Audio/CMakeFiles/dsfml-audio.dir/SoundFile.cpp.o
[ 92%] Building CXX object src/SFML/Audio/CMakeFiles/dsfml-audio.dir/InternalSoundRecorder.cpp.o
[ 94%] Building CXX object src/SFML/Audio/CMakeFiles/dsfml-audio.dir/SoundRecorder.cpp.o
[ 97%] Building CXX object src/SFML/Audio/CMakeFiles/dsfml-audio.dir/SoundSource.cpp.o
[100%] Building CXX object src/SFML/Audio/CMakeFiles/dsfml-audio.dir/SoundStream.cpp.o
Linking CXX shared library ../../../lib/libdsfml-audio.dylib
Undefined symbols for architecture x86_64:
  "_alBufferData", referenced from:
      _sfSoundBuffer_fillBuffer in SoundBuffer.cpp.o
      _sfSoundStream_fillBuffer in SoundStream.cpp.o
  "_alDeleteBuffers", referenced from:
      _sfSoundBuffer_alDeleteBuffer in SoundBuffer.cpp.o
      _sfSoundStream_deleteBuffers in SoundStream.cpp.o
  "_alDeleteSources", referenced from:
      _sfSoundSource_destroy in SoundSource.cpp.o
  "_alGenBuffers", referenced from:
      _sfSoundBuffer_alGenBuffers in SoundBuffer.cpp.o
      _sfSoundStream_alGenBuffers in SoundStream.cpp.o
     (maybe you meant: _sfSoundStream_alGenBuffers, _sfSoundBuffer_alGenBuffers )
  "_alGenSources", referenced from:
      _sfSoundSource_initialize in SoundSource.cpp.o
  "_alGetBufferi", referenced from:
      _sfSoundBuffer_getSampleRate in SoundBuffer.cpp.o
      _sfSoundBuffer_getChannelCount in SoundBuffer.cpp.o
      _sfSoundStream_getBufferSampleSize in SoundStream.cpp.o
  "_alGetEnumValue", referenced from:
      sf::priv::AudioDevice::getFormatFromChannelCount(unsigned int) in AudioDevice.cpp.o
  "_alGetError", referenced from:
      sf::priv::alCheckError(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, unsigned int) in ALCheck.cpp.o
  "_alGetSource3f", referenced from:
      _sfSoundSource_getPosition in SoundSource.cpp.o
  "_alGetSourcef", referenced from:
      _sfSound_getPlayingOffset in Sound.cpp.o
      _sfSoundSource_getPitch in SoundSource.cpp.o
      _sfSoundSource_getVolume in SoundSource.cpp.o
      _sfSoundSource_getMinDistance in SoundSource.cpp.o
      _sfSoundSource_getAttenuation in SoundSource.cpp.o
      _sfSoundStream_getPlayingOffset in SoundStream.cpp.o
  "_alGetSourcei", referenced from:
      _sfSound_getLoop in Sound.cpp.o
      _sfSoundSource_isRelativeToListener in SoundSource.cpp.o
      _sfSoundSource_getStatus in SoundSource.cpp.o
      _sfSoundStream_clearQueue in SoundStream.cpp.o
      _sfSoundStream_getNumberOfBuffersProccessed in SoundStream.cpp.o
  "_alIsExtensionPresent", referenced from:
      sf::priv::AudioDevice::isExtensionSupported(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) in AudioDevice.cpp.o
  "_alSource3f", referenced from:
      _sfSoundSource_setPosition in SoundSource.cpp.o
  "_alSourcePause", referenced from:
      _sfSoundStream_alSourcePause in SoundStream.cpp.o
     (maybe you meant: _sfSoundStream_alSourcePause)
  "_alSourcePlay", referenced from:
      _sfSoundStream_alSourcePlay in SoundStream.cpp.o
     (maybe you meant: _sfSoundStream_alSourcePlay)
  "_alSourceQueueBuffers", referenced from:
      _sfSoundStream_queueBuffer in SoundStream.cpp.o
  "_alSourceStop", referenced from:
      _sfSoundStream_alSourceStop in SoundStream.cpp.o
     (maybe you meant: _sfSoundStream_alSourceStop)
  "_alSourceUnqueueBuffers", referenced from:
      _sfSoundStream_clearQueue in SoundStream.cpp.o
      _sfSoundStream_UnqueueBuffer in SoundStream.cpp.o
  "_alSourcef", referenced from:
      _sfSound_setPlayingOffset in Sound.cpp.o
      _sfSoundSource_setPitch in SoundSource.cpp.o
      _sfSoundSource_setVolume in SoundSource.cpp.o
      _sfSoundSource_setMinDistance in SoundSource.cpp.o
      _sfSoundSource_setAttenuation in SoundSource.cpp.o
  "_alSourcei", referenced from:
      _sfSound_assignBuffer in Sound.cpp.o
      _sfSound_detachBuffer in Sound.cpp.o
      _sfSound_setLoop in Sound.cpp.o
      _sfSoundSource_initialize in SoundSource.cpp.o
      _sfSoundSource_setRelativeToListener in SoundSource.cpp.o
      _sfSoundSource_destroy in SoundSource.cpp.o
      _sfSoundStream_deleteBuffers in SoundStream.cpp.o
      ...
  "_alcCaptureCloseDevice", referenced from:
      InternalSoundRecorder::closeDevice() in InternalSoundRecorder.cpp.o
  "_alcCaptureOpenDevice", referenced from:
      InternalSoundRecorder::initialize(unsigned int) in InternalSoundRecorder.cpp.o
  "_alcCaptureSamples", referenced from:
      InternalSoundRecorder::getSamplePointer(int) in InternalSoundRecorder.cpp.o
  "_alcCaptureStart", referenced from:
      InternalSoundRecorder::startCapture() in InternalSoundRecorder.cpp.o
  "_alcCaptureStop", referenced from:
      InternalSoundRecorder::stopCapture() in InternalSoundRecorder.cpp.o
  "_alcCloseDevice", referenced from:
      sf::priv::AudioDevice::~AudioDevice() in AudioDevice.cpp.o
      sf::priv::AudioDevice::~AudioDevice() in AudioDevice.cpp.o
  "_alcCreateContext", referenced from:
      sf::priv::AudioDevice::AudioDevice() in AudioDevice.cpp.o
  "_alcDestroyContext", referenced from:
      sf::priv::AudioDevice::~AudioDevice() in AudioDevice.cpp.o
      sf::priv::AudioDevice::~AudioDevice() in AudioDevice.cpp.o
  "_alcGetIntegerv", referenced from:
      InternalSoundRecorder::getSampleNumber() in InternalSoundRecorder.cpp.o
  "_alcIsExtensionPresent", referenced from:
      sf::priv::AudioDevice::isExtensionSupported(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) in AudioDevice.cpp.o
  "_alcMakeContextCurrent", referenced from:
      sf::priv::AudioDevice::AudioDevice() in AudioDevice.cpp.o
      sf::priv::AudioDevice::~AudioDevice() in AudioDevice.cpp.o
      sf::priv::AudioDevice::~AudioDevice() in AudioDevice.cpp.o
  "_alcOpenDevice", referenced from:
      sf::priv::AudioDevice::AudioDevice() in AudioDevice.cpp.o
  "_sf_close", referenced from:
      sf::priv::SoundFile::~SoundFile() in SoundFile.cpp.o
      sf::priv::SoundFile::~SoundFile() in SoundFile.cpp.o
      sf::priv::SoundFile::openRead(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) in SoundFile.cpp.o
      sf::priv::SoundFile::openRead(void const*, unsigned long) in SoundFile.cpp.o
      sf::priv::SoundFile::openRead(sf::InputStream&) in SoundFile.cpp.o
      sf::priv::SoundFile::openWrite(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, unsigned int, unsigned int) in SoundFile.cpp.o
  "_sf_open", referenced from:
      sf::priv::SoundFile::openRead(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) in SoundFile.cpp.o
      sf::priv::SoundFile::openWrite(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, unsigned int, unsigned int) in SoundFile.cpp.o
  "_sf_open_virtual", referenced from:
      sf::priv::SoundFile::openRead(void const*, unsigned long) in SoundFile.cpp.o
      sf::priv::SoundFile::openRead(sf::InputStream&) in SoundFile.cpp.o
  "_sf_read_short", referenced from:
      sf::priv::SoundFile::read(short*, unsigned long) in SoundFile.cpp.o
  "_sf_seek", referenced from:
      sf::priv::SoundFile::seek(sf::Time) in SoundFile.cpp.o
  "_sf_strerror", referenced from:
      sf::priv::SoundFile::openRead(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) in SoundFile.cpp.o
      sf::priv::SoundFile::openRead(void const*, unsigned long) in SoundFile.cpp.o
      sf::priv::SoundFile::openRead(sf::InputStream&) in SoundFile.cpp.o
      sf::priv::SoundFile::openWrite(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, unsigned int, unsigned int) in SoundFile.cpp.o
  "_sf_write_short", referenced from:
      sf::priv::SoundFile::write(short const*, unsigned long) in SoundFile.cpp.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[2]: *** [lib/libdsfml-audio.2.0.dylib] Error 1
make[1]: *** [src/SFML/Audio/CMakeFiles/dsfml-audio.dir/all] Error 2
make: *** [all] Error 2
Jebbs commented 10 years ago

What did you do to get the other stuff building? Just curious.

This looks like something I can fix, but I might need you to do the testing since I don't have a Mac. It seems like OpenAL and libsndfile aren't being linked, which is strange considering CMake was able to find them. Since this is a high priority issue it'll take precedence over my other stuff. Hopefully I can get a fix out for you soon!

Jebbs commented 10 years ago

Also, it looks like everything except the audio module was built. It is inconvenient for sure, but at least you can start using the other parts of the binding until I can sort the audio part out. Feel free to open up an issue for any other problems you might encounter!

jaredonline commented 10 years ago

So I deleted the .dylib and .framework files that were installed in /usr/local/lib and /Library related to SFML. Then I deleted all my source files (SFML, CSFML, DSFML-C) and started from scratch. SFML and CSFML built fine, but I got the above error when trying to build DSFML-C.

But now I'm getting all the same errors no matter what I try to build, so I have no idea what's going on. I'm willing to help out any way I can [=

jaredonline commented 10 years ago

I just tried that same strategy to build DSFML-C and now I'm back to the original error. libdsfml-system.dylib builds, but nothing else.

Jebbs commented 10 years ago

Wow. This is crazy. I'll do what I can to help you, but with out a Mac of my own I'm worried there's not much that I can do. Try to not lose hope though! I have Saturday off, and tomorrow morning free. I've also decided that I'll be getting an extra HDD and getting OS X up and running on my own machine.

For now, it might be a good idea to post in the D section of the SFML forums with a title that specifies problems with OS X. Hiura, SFML's OS X guy, has posted in there before when I has some Mac issues. It's possible he might have some answers or suggestions.

jaredonline commented 10 years ago

Okay! I figured something out. When I got CSFML to build, I must have accidentally built it against Dynamic Libraries of SFML-2.0, not static ones (.dylib instead of .a).

Doing the same thing with DSFML-C gets me able to build everything but the audio lib.

Jebbs commented 10 years ago

Does that mean you'd need to include both the SFML .dylibs and the DSFML .dylibs if you wanted to build anything with DSFML?

As far as I know, CSFML is supposed to use the static version library when it builds, so DSFML-C should be the same. I would post in the C section of the SFML forums and just verify this. Laurent or someone else might be able to help you out and we can get some answers.

jaredonline commented 10 years ago

I have a post up in the C section of the SFML forums. I'll post in the D section as well.

Jebbs commented 10 years ago

Cool. I saw both of them. Let's hope we get something!

By the way, thanks for being patient and helping me track this down!

jaredonline commented 10 years ago

I should be thanking you for putting this binding together and helping me get everything resolved! It looks like my post in teh D section of the forums was deleted ]=

Laurent says there was a recent major modification to the static build of CSFML which is untested on Mac. This is most likely causing the issues. I'll keep you posted if I find out more.

Jebbs commented 10 years ago

I saw that! I wonder what happened. Maybe it was deleted because it was a duplicate post? I didn't have a chance to read it so I don't know.

Looks like your update shows some promise though. The actual modification wasn't really in CSFML, it was to the way SFML static libraries are now built. Before it would gather all dependencies for you in some crazy way I don't understand, but now you need to specify those during the link process, and that's what broke things. You can read more about it in this thread if you want.

There's something I've been considering that would fix this, but it would involve linking our D program to the SFML dynamic libraries, the DSFML-C libraries, and the D DSFML libraries. It would work, but could be a little annoying setting a project up.

jaredonline commented 10 years ago

Hey, I've been following that thread all day, it's what helped me make some of the progress I've made. But now I'm a bit stuck.. it looks like it's looking for OpenAL headers, but all I see is the include .dll... I don't think that'll work for a Mac, will it?

jaredonline commented 10 years ago

Okay, I got it. OpenAL is a framework that ships with Mac OS X.

That was the last hurdle! They both built! DSFML- C, DSFML, and CSFML all build.

But now there's a new problem:

(I'm using dub, I don't know if that's good or bad [did I mention I'm brand new to D?])

app.d

import std.stdio;
import mapping.map;

import dsfml.graphics.all;

void main()
{
}

package.json

{
    "name": "dgame",
    "description": "An example project skeleton",
    "homepage": "http://example.org",
    "copyright": "Copyright © 2000, Your Name",
    "authors": [
        "Your Name"
    ],
    "dependencies": {
    },
  "dflags": [
    "-I/Users/jared/src/DSFML/src/",
    "-L+/Users/jared/src/DSFML-C Builds/clang/lib/",
    "-L+/Users/jared/src/DSFML/lib/"
  ]
}

Output:

[jared@Adam-Smith DGame (master)]$ dub -v
Using dub registry url 'http://code.dlang.org/'
Looking for local package map at /var/lib/dub/packages/
Looking for local package map at /Users/jared/.dub/packages/
Looking for local package map at /var/lib/dub/packages/
Looking for local package map at /Users/jared/.dub/packages/
Looking for local package map at /var/lib/dub/packages/
Looking for local package map at /Users/jared/.dub/packages/
Looking for local package map at /var/lib/dub/packages/
Looking for local package map at /Users/jared/.dub/packages/
Failed to run git: git rev-parse failed: fatal: Not a git repository: '/Users/jared/Code/DGame/.git'

Note: Failed to determine version of package dgame at /Users/jared/Code/DGame. Assuming ~master.
Collecting dependencies for dgame
Checking dependencies in '/Users/jared/Code/DGame'
dub initialized
Generating using build
Using config application for dgame
Using config application for dgame
Building configuration "application", build type debug
Application output name is '/tmp/dub/2226245526/dgame'
Running dmd (compile)...
dmd -I/Users/jared/src/DSFML/src/ -L+/Users/jared/src/DSFML-C Builds/clang/lib/ -L+/Users/jared/src/DSFML/lib/ -w -g -debug -c -of/tmp/dub/2226245526/temp.o -version=Have_dgame -I/Users/jared/Code/DGame/source -J/Users/jared/Code/DGame/views source/app.d source/mapping/generator.d source/mapping/map.d source/mapping/tile.d
Linking...
dmd -of/tmp/dub/2226245526/dgame /tmp/dub/2226245526/temp.o -g
Undefined symbols for architecture x86_64:
  "_D5dsfml8graphics3all12__ModuleInfoZ", referenced from:
      _D3app12__ModuleInfoZ in temp.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
--- errorlevel 1
Error: Link command failed with exit code 1

Full exception: object.Exception@source/dub/compilers/dmd.d(120): Link command failed with exit code 1
----------------
5   dub                                 0x0000000102639657 pure @safe bool std.exception.enforce!(bool).enforce(bool, lazy const(char)[], immutable(char)[], ulong) + 107
6   dub                                 0x00000001026230ff void dub.compilers.dmd.DmdCompiler.invokeLinker(const(dub.compilers.compiler.BuildSettings), const(dub.compilers.compiler.BuildPlatform), immutable(char)[][]) + 987
7   dub                                 0x0000000102626f05 void dub.generators.build.BuildGenerator.generateProject(dub.generators.generator.GeneratorSettings) + 4897
8   dub                                 0x00000001025ff2e4 void dub.dub.Dub.generateProject(immutable(char)[], dub.generators.generator.GeneratorSettings) + 160
9   dub                                 0x00000001025f3fbd _Dmain + 6333
10  dub                                 0x00000001026dc951 extern (C) int rt.dmain2._d_run_main(int, char**, extern (C) int function(char[][])*).void runMain() + 33
11  dub                                 0x00000001026dc49d extern (C) int rt.dmain2._d_run_main(int, char**, extern (C) int function(char[][])*).void tryExec(scope void delegate()) + 45
12  dub                                 0x00000001026dc99d extern (C) int rt.dmain2._d_run_main(int, char**, extern (C) int function(char[][])*).void runAll() + 61
13  dub                                 0x00000001026dc49d extern (C) int rt.dmain2._d_run_main(int, char**, extern (C) int function(char[][])*).void tryExec(scope void delegate()) + 45
14  dub                                 0x00000001026dc451 _d_run_main + 457
15  dub                                 0x00000001026dc280 main + 20
16  libdyld.dylib                       0x00007fff909dc5fd start + 1
17  ???                                 0x0000000000000002 0x0 + 2
Run 'dub help' for usage information.
[jared@Adam-Smith DGame (master)]$ 
Jebbs commented 10 years ago

I'm not terribly familiar with dub, but I will be trying to put in a dub file for DSFML in the near future. It looks like you are correctly setting up your link paths, but your dependency list is blank so you aren't actually linking to any of the libraries themselves.

jaredonline commented 10 years ago

Judging from their docs, it looks like the dependencies section is supposed to be be for other Dub packages? I'm not sure http://code.dlang.org/package-format

One thing, in your example, you have a bunch of files like dsfml-system-2.lib but I don't have those anywhere (that I can find). I have libdsfml-system.a

Jebbs commented 10 years ago

Yep, that's why I need to get a dub file made :P

The dsfml-xxx-2.lib are just for windows. They're import libraries. In your case, you'll be linking to the dsfml-xxx-2.dylibs instead. The libdsfml-xxx.a files will be replacing the dsfml-xxx.lib files in the tutorial. If you give me a sec, I can write out what the command line should look like as an example if you want.

jaredonline commented 10 years ago

That'd be awesome. My head is swimming with all this stuff right now [=

This is what I was just trying:

dmd main.d libdsfml-window.dylib libdsfml-graphics.dylib libdsfml-system.dylib -I/Users/jared/src/DSFML/src/ -L+/Users/jared/src/DSFML-C-Builds/clang/lib/ -L+/Users/jared/src/DSFML/lib/
Error: unrecognized file extension dylib
jaredonline commented 10 years ago

Soooo I think I got the command right, but now I'm getting undefined symbol issues:

dmd main.d -I/Users/jared/src/DSFML/src/ -L-L/Users/jared/src/DSFML-C-Builds/clang/lib/ -L-L/Users/jared/src/DSFML/lib/ -L-ldsfml-system -L-ldsfml-window -L-ldsfml-graphics -g
Undefined symbols for architecture x86_64:
  "_D5dsfml6system7vector214__T7Vector2TfZ7Vector26__ctorMFNaNbNcNfffZS5dsfml6system7vector214__T7Vector2TfZ7Vector2", referenced from:
      __Dmain in main.o
  "_D5dsfml6system7vector214__T7Vector2TfZ7Vector26__initZ", referenced from:
      __Dmain in main.o
  "_D5dsfml6window15contextsettings15ContextSettings7DefaultxS5dsfml6window15contextsettings15ContextSettings", referenced from:
      __Dmain in main.o
  "_D5dsfml6window5event5Event6__initZ", referenced from:
      __Dmain in main.o
  "_D5dsfml6window9videomode9VideoMode6__ctorMFNckkkZS5dsfml6window9videomode9VideoMode", referenced from:
      __Dmain in main.o
  "_D5dsfml8graphics11circleshape11CircleShape6__ctorMFfkZC5dsfml8graphics11circleshape11CircleShape", referenced from:
      __Dmain in main.o
  "_D5dsfml8graphics11circleshape11CircleShape7__ClassZ", referenced from:
      __Dmain in main.o
  "_D5dsfml8graphics12renderstates12RenderStates7DefaultFZS5dsfml8graphics12renderstates12RenderStates", referenced from:
      __Dmain in main.o
  "_D5dsfml8graphics12renderwindow12RenderWindow6__ctorMFS5dsfml6window9videomode9VideoModeAyaE5dsfml6window6window6Window5StyleKxS5dsfml6window15contextsettings15ContextSettingsZC5dsfml8graphics12renderwindow12RenderWindow", referenced from:
      __Dmain in main.o
  "_D5dsfml8graphics12renderwindow12RenderWindow7__ClassZ", referenced from:
      __Dmain in main.o
  "_D5dsfml8graphics14rectangleshape14RectangleShape6__ctorMFS5dsfml6system7vector214__T7Vector2TfZ7Vector2ZC5dsfml8graphics14rectangleshape14RectangleShape", referenced from:
      __Dmain in main.o
  "_D5dsfml8graphics14rectangleshape14RectangleShape7__ClassZ", referenced from:
      __Dmain in main.o
  "_D5dsfml8graphics3all12__ModuleInfoZ", referenced from:
      _D4main12__ModuleInfoZ in main.o
  "_D5dsfml8graphics5color5Color3RedyS5dsfml8graphics5color5Color", referenced from:
      __Dmain in main.o
  "_D5dsfml8graphics5color5Color4BlueyS5dsfml8graphics5color5Color", referenced from:
      __Dmain in main.o
  "_D5dsfml8graphics5color5Color5BlackyS5dsfml8graphics5color5Color", referenced from:
      __Dmain in main.o
  "_D5dsfml8graphics5color5Color5GreenyS5dsfml8graphics5color5Color", referenced from:
      __Dmain in main.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
--- errorlevel 1
Jebbs commented 10 years ago

I'll have to update the tutorial for OS X because it is a little different. Looks like you almost had it. You just need to link with both sets of libs.

Try this:

dmd main.d libdsfml-system.a libdsfml-window.a libdsfml-graphics.a -I/Users/jared/src/DSFML/src/ -L-L/Users/jared/src/DSFML-C-Builds/clang/lib/ -L-L/Users/jared/src/DSFML/lib/ -L-lcsfml-system -L-ldsfml-window -L-lcsfml-graphics -g

jaredonline commented 10 years ago

Now I'm getting:

dmd main.d libdsfml-system.a libdsfml-window.a libdsfml-graphics.a -I/Users/jared/src/DSFML/src/ -L-L/Users/jared/src/DSFML-C-Builds/clang/lib/ -L-L/Users/jared/src/DSFML/lib/ -L-lcsfml-system -L-ldsfml-window -L-lcsfml-graphics -g
clang: error: no such file or directory: 'libdsfml-system.a'
clang: error: no such file or directory: 'libdsfml-window.a'
clang: error: no such file or directory: 'libdsfml-graphics.a'
Jebbs commented 10 years ago

Hmm.. Assuming libdsfml-system.a, libdsfml-window.a, and libdsfml-graphics.a are in your /Users/jared/src/DSFML/lib/ directory, that should work.

Also, there was a typo in the command line I posted. it used -L-lcsfml-system but it should be -L-ldsfml-system

jaredonline commented 10 years ago

Yea, I fixed the typo... trying to work out the source issues. Yea, the files are in /Users/jared/src/DSFML/lib/

jaredonline commented 10 years ago

So the .a files should be linked during the link phase, right? Not compiled during the dmd compile phase?

jaredonline commented 10 years ago

Putting in the fully qualified path I get

dmd main.d /Users/jared/src/DSFML/lib/libdsfml-system.a  /Users/jared/src/DSFML/lib/libdsfml-graphics.a -L/Users/jared/src/DSFML/lib/ -I/Users/jared/src/DSFML/src/ -L-L/Users/jared/src/DSFML-C-Builds/clang/lib/  -L-ldsfml-system -L-ldsfml-window -L-ldsfml-graphics -g 
ld: can't map file, errno=22 file '/Users/jared/src/DSFML/lib/' for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
--- errorlevel 1

Also... I'm missing libdsfml-window.a

jaredonline commented 10 years ago

Re: missing libdsfml-window.a:

rdmd build.d
You're about to build DSFML! Go you!

Building for OSX

Building system module.
Building audio module.
Building network module.
Building window module.
Building graphics module.
Done!
[jared@Adam-Smith DSFML (master)]$ ll lib
total 5304
drwxr-xr-x  6 jared  staff   204B Nov  8 17:43 .
drwxr-xr-x  8 jared  staff   272B Nov  8 17:43 ..
-rw-r--r--  1 jared  staff   702K Nov  8 20:21 libdsfml-audio.a
-rw-r--r--  1 jared  staff   869K Nov  8 20:21 libdsfml-graphics.a
-rw-r--r--  1 jared  staff   556K Nov  8 20:21 libdsfml-network.a
-rw-r--r--  1 jared  staff   514K Nov  8 20:21 libdsfml-system.a
jaredonline commented 10 years ago

Sorry to keep spamming you.

I think I've gotten to the point where I'm just missing libdsfml-window.a:

dmd main.d /Users/jared/src/DSFML/lib/libdsfml-system.a  /Users/jared/src/DSFML/lib/libdsfml-graphics.a -I/Users/jared/src/DSFML/src/ -L-L/Users/jared/src/DSFML-C-Builds/clang/lib/  -L-ldsfml-system -L-ldsfml-window -L-ldsfml-graphics -g 
Undefined symbols for architecture x86_64:
  "_D5dsfml6window15contextsettings15ContextSettings6__initZ", referenced from:
      _D5dsfml8graphics12renderwindow12RenderWindow11getSettingsMxFZS5dsfml6window15contextsettings15ContextSettings in libdsfml-graphics.a(renderwindow_285_4d8.o)
  "_D5dsfml6window15contextsettings15ContextSettings7DefaultxS5dsfml6window15contextsettings15ContextSettings", referenced from:
      __Dmain in main.o
  "_D5dsfml6window3all12__ModuleInfoZ", referenced from:
      _D5dsfml8graphics3all12__ModuleInfoZ in libdsfml-graphics.a(all.o)
  "_D5dsfml6window5event5Event6__initZ", referenced from:
      __Dmain in main.o
  "_D5dsfml6window6window12__ModuleInfoZ", referenced from:
      _D5dsfml8graphics12renderwindow12__ModuleInfoZ in libdsfml-graphics.a(renderwindow.o)
      _D5dsfml8graphics7texture12__ModuleInfoZ in libdsfml-graphics.a(texture.o)
  "_D5dsfml6window6window6Window16getWindowPointerFC5dsfml6window6window6WindowZPv", referenced from:
      _D5dsfml8graphics12renderwindow12RenderWindow12getWindowPtrMFC5dsfml6window6window6WindowZPv in libdsfml-graphics.a(renderwindow_285_4d8.o)
      _D5dsfml8graphics12renderwindow12RenderWindow13windowPointerFC5dsfml6window6window6WindowZPv in libdsfml-graphics.a(renderwindow_285_4d8.o)
  "_D5dsfml6window6window6Window6__ctorMFZC5dsfml6window6window6Window", referenced from:
      _D5dsfml8graphics12renderwindow12RenderWindow6__ctorMFZC5dsfml8graphics12renderwindow12RenderWindow in libdsfml-graphics.a(renderwindow_285_4d8.o)
      _D5dsfml8graphics12renderwindow12RenderWindow6__ctorMFS5dsfml6window9videomode9VideoModeAyaE5dsfml6window6window6Window5StyleKxS5dsfml6window15contextsettings15ContextSettingsZC5dsfml8graphics12renderwindow12RenderWindow in libdsfml-graphics.a(renderwindow_285_4d8.o)
      _D5dsfml8graphics12renderwindow12RenderWindow6__ctorMFS5dsfml6window9videomode9VideoModeAywE5dsfml6window6window6Window5StyleKxS5dsfml6window15contextsettings15ContextSettingsZC5dsfml8graphics12renderwindow12RenderWindow in libdsfml-graphics.a(renderwindow_285_4d8.o)
      _D5dsfml8graphics12renderwindow12RenderWindow6__ctorMFmKxS5dsfml6window15contextsettings15ContextSettingsZC5dsfml8graphics12renderwindow12RenderWindow in libdsfml-graphics.a(renderwindow_285_4d8.o)
  "_D5dsfml6window6window6Window7__ClassZ", referenced from:
      _D5dsfml8graphics12renderwindow12RenderWindow7__ClassZ in libdsfml-graphics.a(renderwindow_285_4d8.o)
  "_D5dsfml6window9videomode12__ModuleInfoZ", referenced from:
      _D5dsfml8graphics12renderwindow12__ModuleInfoZ in libdsfml-graphics.a(renderwindow.o)
  "_D5dsfml6window9videomode9VideoMode6__ctorMFNckkkZS5dsfml6window9videomode9VideoMode", referenced from:
      __Dmain in main.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
--- errorlevel 1
jaredonline commented 10 years ago

Trying to build the window module by hand I'm getting:

dmd src/dsfml/window/all.d src/dsfml/window/context.d src/dsfml/window/contextsettings.d src/dsfml/window/event.d src/dsfml/window/joystick.d src/dsfml/window/keyboard.d src/dsfml/window/mouse.d src/dsfml/window/videomode.d src/dsfml/window/window.d src/dsfml/window/windowhandle.d -lib -O -release -inline -property -I/Users/jared/src/DSFML/src -of/Users/jared/src/DSFML/lib/libdsfml-window.a
src/dsfml/window/mouse.d(74): Error: mutable method dsfml.window.window.Window.mouse_SetPosition is not callable using a const object`
Jebbs commented 10 years ago

I caught that the other day, but it looks like I only fixed that in RenderWindow.

In window.d, if you add const to the end of setMousePosition(line 227) and mouse_setPosition(line 232) you shouldn't get that error anymore.

jaredonline commented 10 years ago

It compiled!!! But!

./main
dyld: Library not loaded: libdsfml-system.2.dylib
  Referenced from: /Users/jared/Desktop/./main
  Reason: image not found
Trace/BPT trap: 5

I tried this:

dmd main.d /Users/jared/src/DSFML/lib/libdsfml-system.a \
> /Users/jared/src/DSFML/lib/libdsfml-window.a \
> /Users/jared/src/DSFML/lib/libdsfml-graphics.a \
> -I/Users/jared/src/DSFML/src/ \
> -L-L/Users/jared/src/DSFML-C-Builds/clang/lib/ -L-ldsfml-system.2 \
> -L-ldsfml-window.2 -L-ldsfml-graphics.2  -L-ldsfml-system \
> -L-ldsfml-window -L-ldsfml-graphics -g

But that didn't help.

One. Step. At. A. Time ]=

jaredonline commented 10 years ago

BAM!!!

IT WORKED!

I had to follow instructions from http://stackoverflow.com/questions/17703510/dyld-library-not-loaded-reason-image-not-loaded

Yay!

Thank you so so so much for all the patience and help. I'll write up some formal instructions for your Wiki if you'd like? Or some troubleshooting tips.

Jebbs commented 10 years ago

That's awesome! I'm happy you were able to get it working!

If it's not too much trouble, if you could make a copy of the current build tutorial and add in all the parts that are OS X specific, I'll go through it later and turn it in to a Mac only tutorial. It was my plan to split them up into a tutorial for each OS eventually, but it looks like one for OS X specifically now is much needed. Alternatively, you could email me a walk through of what you did, and I can make the separate tutorial myself. Either one is fine by me.

The other thing you could do for me is make a pull request for all of the CMake files you changed. Fixing those means no one else will have the same build errors you had in the beginning. I'm certain Laurent would appreciate you doing the same for CSFML too.

I should be the one to thank you! You did most of the work. Much appreciated!

Jebbs commented 10 years ago

I was looking at some mac stuff, and although I can't test it yet, I had a question that maybe you can answer for me.

It looks like that when you build DSFML-C, you get a couple of sets of dylibs. dsfml-xxx.dylib, dsfml-xxx.2.dylib, and dsfml.2.0.dylib, right? From what I can tell, dsfml-xxx.dylib just routs things to dsfml-xxx.2.dylib, which in turn routs things to dsfml-xxx.2.0.dylib. The dsfml-xxx.2.0.dylib seems to be the "real" dynamic library, so I'm not sure why the others exists. Is it possible to just link directly to the dsfml-xxx.2.0.dylibs?

Also, did you ever figure out why you had to put in the full path to your D static libraries in order to get it to find them? I feel like there should be an easier way than to put in the full path for each one. Maybe a different linker flag I'm not aware of?

jaredonline commented 10 years ago

Hey @Jebbs, didn't get any time over the weekend to look, but I'll try this week.

I'll totally put in pull requests for the wiki, and for the DSFML-C CMakeLists file (and probably for the CSFML ones too).

I'll take a look into the many .dylib files that are generated and which ones I need to be linking to.

I haven't figured out what the deal with the full paths is yet, also looking into that.

The last thing I'm doing is trying to figure out how to get DUB to build teh project successfully. Lots of investigating going on [=

Jebbs commented 10 years ago

No worries! Someone else contacted me about getting the DUB stuff up and running, so I was going to see if I could get that up and running tomorrow. I don't use DUB, but it looks like its getting even more popular, so I figured I might as well get it soon. For now, don't stress too much about getting the DUB stuff done.

Thanks so much for all your help!

jaredonline commented 10 years ago

My pleasure to help!

If you'd like, I can share with you my learnings about DUB. As far as I can tell, it splits compilation into two steps. First, it compiles (without linking) into a temp file, in /tmp/dub/#{timestamp}/#{executable}.o. This command is passed only the DUB compile flags (listed in the "dflags" attribute of package.json). Next, the linking happens as a separate command, and is only passed the linked flags.

Both commands look correct, but when I run them (outside of DUB), I get errors. If I combine them into a single step, it compiles just fine.

jaredonline commented 10 years ago

I've added my notes to the Wiki for building DSFML-C, I'll update it again with the compilation instructions.

Jebbs commented 10 years ago

Is there any way you can do a pull request for the alerted cmake file? I think that would be easier for the Mac users.

jaredonline commented 10 years ago

I'm actually pretty unfamiliar with CMake, and didn't make any changes to the file directly. Wanna help me get it setup?

Jebbs commented 10 years ago

Oh, interesting. Looks like I just misunderstood the section you wrote. I don't know CMake too well, but I might be able to get it to the point where you can see what I am going for and could maybe finish it out. I pretty much just copied over everything from CSFML and played around with it until it worked :P

I have tomorrow off, so I'll let you know if I think I have anything!

jaredonline commented 10 years ago

Cool! Just so you know, I have a thread open on the DUB forums about my issues: http://forum.rejectedsoftware.com/groups/rejectedsoftware.dub/thread/509/

jaredonline commented 10 years ago

Hey @Jebbs, just wanted to check in and see if there's anything I can do to push this forward.

Jebbs commented 10 years ago

Thanks for checking in!

I was working on wrapping up another project of mine so that I could focus on DSFML before I start my planning for the SFML Game Jam, but I got to a good stopping point yesterday so DSFML has my full attention now. :)

For getting DSFML-C to build for OSX, I was planning on going through SFML's CMake files for information on how it does things. It should really be pretty similar to the way it builds the shared libraries in terms of scanning for and grabbing all dependencies. I'll be able to check it out today or tomorrow, so expect an update on that soon. I hope to have something that can be tested in the next couple of days.

Relating to the DUB stuff, I added a temp DUB package.json that should be ready enough by the end of the day for testing. Never used DUB before, so I don't know how long that will take, but you can also expect an update on that very soon.

Jebbs commented 10 years ago

More updates!

I'm looking in to the library name thing. I think the reason you needed the full path to your static libs is relevant to the issue.(check out #68) Because of this, the DUB file won't be ready until tomorrow, but I think you won't have the error you experienced in that post you linked to any longer.

Also, it looks like Laurent did some updates for CSFML's CMake files so that might take longer than I originally thought to get those looked into. I need to make sure we have everything we need when they build dynamically.

Jebbs commented 10 years ago

Updates!

Haven't had a chance to take care of the cmake stuff yet, but I'm almost there.

The DUB package.json is just about ready, I'm just getting a few couple of things finished up. I have my own thread on the DUB forums, and Sönke Ludwig has been helping me out as well. Shouldn't be much longer.

About the static library issue, I updated a few things in the wiki and in the build script. When you run the build script, it produces libraries named libdsfml-xxx-2.a, the -2 prefix being new so that the names are different from the dylibs. Adding the path to the static libs to the linker like before, you should now be able to link to them the same way as the dylibs: -L-ldsfml-xxx-2.

Jebbs commented 10 years ago

More update!

I was successful in getting dub to build a DSFML application. Changes have been uploaded, but I'll do a short tutorial tomorrow!

Jebbs commented 10 years ago

Forgot to let you know about this, but I did add a tutorial to the wiki. You can find it here: https://github.com/Jebbs/DSFML/wiki/Building-The-Library-And-Your-First-DSFML-Program%28DUB-Edition!%29

Let me know what you think!

My next project is to update parts of the wiki to make it better, and split up the tutorials for each OS. That shoudl make following them a little easier. :)

I also wanted to say that I am working on getting OSX up and running on a VM. I hope to be able to have things working and building soon so hopefully we can have easier building all around. You'll know if I make progress there!

jaredonline commented 10 years ago

Hey! Sorry I've been so unresponsive. Slammed at work right now.

I'm excited to try out the new DUB package stuff and see if I can get it to work =D

Let me know if you need any help testing things for OS X. I'll be digging into all this in more detail soon I hope... either tonight or tomorrow.