Allegro.cc - Online Community

Allegro.cc Forums » Installation, Setup & Configuration » Wanting to build a static release for OSX

This thread is locked; no one can reply to it. rss feed Print
Wanting to build a static release for OSX
Mark Oates
Member #1,146
March 2001
avatar

Good Afternoon everybody,

I'm trying to compile a distributable version of my game that I can send to other people using OSX. My first realization was that .dylib files were missing on the user's computer.

I tried appending *-static to all of the -l files in the Makefile, but no static version existed. Looking into my own /usr/local/libs/ I found that there were only `.dylib`s (no .a and no -static allegro libs).

So I managed to compile a fresh version of allegro thusly:

$~Repos/allegro/> mkdir build
$~Repos/allegro/> cd build
$~Repos/allegro/build/> cmake -DSHARED=0 ..
$~Repos/allegro/build/> make
$~Repos/allegro/build/> sudo make install

This generated the *-static.a files as expected. And upon appending `-static` to each of the libs, my project fails at the linking stage with the following errors:

markoates  ~/Repos/krampushack-2016 ▶ make                                                                                                                        4.Jan.17 01.13
g++ -std=gnu++11 obj/controllers/ai_kid_controller.o obj/controllers/audio_controller.o obj/controllers/player_krampus_controller.o obj/emitters/user_event_emitter.o obj/entities/background_entity.o obj/entities/damage_zone_entity.o obj/entities/door_entity.o obj/entities/entity_base.o obj/entities/item_entity.o obj/entities/kid_entity.o obj/entities/krampus_entity.o obj/factories/dialogue_factory.o obj/factories/entity_factory.o obj/factories/scene_factory.o obj/factories/storyboard_factory.o obj/generators/kid_name_generator.o obj/helpers/game_play_screen_state_helper.o obj/helpers/scene_collection_helper.o obj/helpers/scene_collision_helper.o obj/models/camera.o obj/models/hud.o obj/models/inventory.o obj/models/item_dialogue.o obj/models/naughty_list.o obj/models/scene.o obj/screens/game_play_screen.o obj/screens/storyboard_screen.o obj/screens/title_screen.o obj/sprite_sheet.o programs/krampushack.cpp -o bin/krampushack -lallegro_flare-0.8.8wip -lallegro_color-static -lallegro_font-static -lallegro_ttf-static -lallegro_dialog-static -lallegro_audio-static -lallegro_acodec-static -lallegro_primitives-static -lallegro_image-static -lallegro_main-static -lallegro-static  -L/Users/markoates/Repos/allegro_flare/lib -L/Users/markoates/Repos/allegro5/build/lib -framework OpenGL -I/Users/markoates/Repos/allegro_flare/include -I/Users/markoates/Repos/allegro5/build/include -I./include
Undefined symbols for architecture x86_64:
  "_AudioQueueAllocateBuffer", referenced from:
      __aqueue_allocate_recorder in liballegro_audio-static.a(aqueue.m.o)
      _stream_proc in liballegro_audio-static.a(aqueue.m.o)
  "_AudioQueueDispose", referenced from:
      __aqueue_stop_voice in liballegro_audio-static.a(aqueue.m.o)
      __aqueue_deallocate_recorder in liballegro_audio-static.a(aqueue.m.o)
  "_AudioQueueEnqueueBuffer", referenced from:
      __aqueue_allocate_recorder in liballegro_audio-static.a(aqueue.m.o)
      _stream_proc in liballegro_audio-static.a(aqueue.m.o)
      _handle_buffer in liballegro_audio-static.a(aqueue.m.o)
      __aqueue_recording_callback in liballegro_audio-static.a(aqueue.m.o)
  "_AudioQueueNewInput", referenced from:
      __aqueue_allocate_recorder in liballegro_audio-static.a(aqueue.m.o)
  "_AudioQueueNewOutput", referenced from:
      _stream_proc in liballegro_audio-static.a(aqueue.m.o)
  "_AudioQueueSetParameter", referenced from:
      _stream_proc in liballegro_audio-static.a(aqueue.m.o)
  "_AudioQueueStart", referenced from:
      __aqueue_allocate_recorder in liballegro_audio-static.a(aqueue.m.o)
      _stream_proc in liballegro_audio-static.a(aqueue.m.o)
  "_AudioQueueStop", referenced from:
      __aqueue_deallocate_recorder in liballegro_audio-static.a(aqueue.m.o)
  "_CFArrayCreate", referenced from:
      _init_joystick in liballegro-static.a(hidjoy.m.o)
  "_CFArrayGetCount", referenced from:
      __al_osx_get_num_display_modes in liballegro-static.a(system.m.o)
      _create_display_fs in liballegro-static.a(osxgl.m.o)
      _resize_display_fs in liballegro-static.a(osxgl.m.o)
      _device_add_callback in liballegro-static.a(hidjoy.m.o)
      __al_osx_hid_scan in liballegro-static.a(hidman.m.o)
      _hid_scan_application in liballegro-static.a(hidman.m.o)
  "_CFArrayGetTypeID", referenced from:
      __al_osx_hid_scan in liballegro-static.a(hidman.m.o)
      _hid_scan_application in liballegro-static.a(hidman.m.o)
  "_CFArrayGetValueAtIndex", referenced from:
      __al_osx_get_num_display_modes in liballegro-static.a(system.m.o)
      _create_display_fs in liballegro-static.a(osxgl.m.o)
      _resize_display_fs in liballegro-static.a(osxgl.m.o)
      _device_add_callback in liballegro-static.a(hidjoy.m.o)
      __al_osx_hid_scan in liballegro-static.a(hidman.m.o)
      _hid_scan_application in liballegro-static.a(hidman.m.o)
  "_CFBundleCreate", referenced from:
      __al_ogl_manage_extensions in liballegro-static.a(extensions.c.o)
  "_CFBundleGetFunctionPointerForName", referenced from:
      _al_get_opengl_proc_address in liballegro-static.a(extensions.c.o)
      _load_extension in liballegro-static.a(extensions.c.o)
  "_CFDictionaryCreate", referenced from:
      _resize_display_fs in liballegro-static.a(osxgl.m.o)
  "_CFDictionaryCreateMutable", referenced from:
      _CreateDeviceMatchingDictionary in liballegro-static.a(hidjoy.m.o)
  "_CFDictionaryGetTypeID", referenced from:
      __al_osx_hid_scan in liballegro-static.a(hidman.m.o)
      _hid_scan_application in liballegro-static.a(hidman.m.o)
  "_CFDictionaryGetValue", referenced from:
      __al_osx_hid_scan in liballegro-static.a(hidman.m.o)
      _hid_scan_application in liballegro-static.a(hidman.m.o)
      _hid_store_element_data in liballegro-static.a(hidman.m.o)
  "_CFDictionarySetValue", referenced from:
      _CreateDeviceMatchingDictionary in liballegro-static.a(hidjoy.m.o)
      __al_osx_hid_scan in liballegro-static.a(hidman.m.o)
  "_CFGetTypeID", referenced from:
      _init_joystick in liballegro-static.a(hidjoy.m.o)
      __al_osx_hid_scan in liballegro-static.a(hidman.m.o)
      _hid_scan_application in liballegro-static.a(hidman.m.o)
  "_CFNumberCreate", referenced from:
      _CreateDeviceMatchingDictionary in liballegro-static.a(hidjoy.m.o)
      __al_osx_hid_scan in liballegro-static.a(hidman.m.o)
  "_CFNumberGetValue", referenced from:
      __al_osx_hid_scan in liballegro-static.a(hidman.m.o)
      _hid_scan_application in liballegro-static.a(hidman.m.o)
      _hid_store_element_data in liballegro-static.a(hidman.m.o)
  "_CFRelease", referenced from:
      __al_osx_get_num_display_modes in liballegro-static.a(system.m.o)
      _create_display_fs in liballegro-static.a(osxgl.m.o)
      _resize_display_fs in liballegro-static.a(osxgl.m.o)
      _init_joystick in liballegro-static.a(hidjoy.m.o)
      _exit_joystick in liballegro-static.a(hidjoy.m.o)
      _CreateDeviceMatchingDictionary in liballegro-static.a(hidjoy.m.o)
      _device_add_callback in liballegro-static.a(hidjoy.m.o)
      ...
  "_CFRunLoopAddSource", referenced from:
      +[ALJoystickHelper startQueues] in liballegro-static.a(hidjoy-10.4.m.o)
  "_CFRunLoopGetCurrent", referenced from:
      _stream_proc in liballegro_audio-static.a(aqueue.m.o)
      _exit_joystick in liballegro-static.a(hidjoy.m.o)
      +[ALJoystickHelper startQueues] in liballegro-static.a(hidjoy-10.4.m.o)
      +[ALJoystickHelper stopQueues] in liballegro-static.a(hidjoy-10.4.m.o)
  "_CFRunLoopGetMain", referenced from:
      _init_joystick in liballegro-static.a(hidjoy.m.o)
  "_CFRunLoopRemoveSource", referenced from:
      +[ALJoystickHelper stopQueues] in liballegro-static.a(hidjoy-10.4.m.o)
  "_CFRunLoopRunInMode", referenced from:
      _stream_proc in liballegro_audio-static.a(aqueue.m.o)
  "_CFSetGetCount", referenced from:
      _init_joystick in liballegro-static.a(hidjoy.m.o)
  "_CFStringCompare", referenced from:
      __al_osx_get_num_display_modes in liballegro-static.a(system.m.o)
      _create_display_fs in liballegro-static.a(osxgl.m.o)
      _resize_display_fs in liballegro-static.a(osxgl.m.o)
  "_CFStringCreateWithCString", referenced from:
      _al_get_opengl_proc_address in liballegro-static.a(extensions.c.o)
  "_CFStringCreateWithCStringNoCopy", referenced from:
      _load_extension in liballegro-static.a(extensions.c.o)
  "_CFStringGetCStringPtr", referenced from:
      _device_add_callback in liballegro-static.a(hidjoy.m.o)
      __al_osx_hid_scan in liballegro-static.a(hidman.m.o)
      _hid_store_element_data in liballegro-static.a(hidman.m.o)
  "_CFStringGetSystemEncoding", referenced from:
      __al_osx_hid_scan in liballegro-static.a(hidman.m.o)
      _hid_store_element_data in liballegro-static.a(hidman.m.o)
  "_CFURLCreateWithFileSystemPath", referenced from:
      __al_ogl_manage_extensions in liballegro-static.a(extensions.c.o)
  "_CFUUIDGetConstantUUIDWithBytes", referenced from:
      _add_device in liballegro-static.a(hidjoy-10.4.m.o)
      __al_osx_hid_scan in liballegro-static.a(hidman.m.o)
  "_CFUUIDGetUUIDBytes", referenced from:
      _add_device in liballegro-static.a(hidjoy-10.4.m.o)
      __al_osx_hid_scan in liballegro-static.a(hidman.m.o)
  "_CGDisplayBounds", referenced from:
      _osx_get_monitor_info in liballegro-static.a(system.m.o)
  "_CGDisplayCapture", referenced from:
      _create_display_fs in liballegro-static.a(osxgl.m.o)
  "_CGDisplayCopyAllDisplayModes", referenced from:
      __al_osx_get_num_display_modes in liballegro-static.a(system.m.o)
      _create_display_fs in liballegro-static.a(osxgl.m.o)
      _resize_display_fs in liballegro-static.a(osxgl.m.o)
  "_CGDisplayCopyDisplayMode", referenced from:
      _create_display_fs in liballegro-static.a(osxgl.m.o)
      _resize_display_fs in liballegro-static.a(osxgl.m.o)
  "_CGDisplayIDToOpenGLDisplayMask", referenced from:
      _osx_set_opengl_pixelformat_attributes in liballegro-static.a(osxgl.m.o)
  "_CGDisplayModeCopyPixelEncoding", referenced from:
      __al_osx_get_num_display_modes in liballegro-static.a(system.m.o)
      _create_display_fs in liballegro-static.a(osxgl.m.o)
      _resize_display_fs in liballegro-static.a(osxgl.m.o)
  "_CGDisplayModeGetHeight", referenced from:
      __al_osx_get_num_display_modes in liballegro-static.a(system.m.o)
      _create_display_fs in liballegro-static.a(osxgl.m.o)
      _resize_display_fs in liballegro-static.a(osxgl.m.o)
  "_CGDisplayModeGetRefreshRate", referenced from:
      __al_osx_get_num_display_modes in liballegro-static.a(system.m.o)
  "_CGDisplayModeGetWidth", referenced from:
      __al_osx_get_num_display_modes in liballegro-static.a(system.m.o)
      _create_display_fs in liballegro-static.a(osxgl.m.o)
      _resize_display_fs in liballegro-static.a(osxgl.m.o)
  "_CGDisplayModeRelease", referenced from:
      +[ALDisplayHelper destroyDisplay:] in liballegro-static.a(osxgl.m.o)
  "_CGDisplayMoveCursorToPoint", referenced from:
      _osx_set_mouse_xy in liballegro-static.a(qzmouse.m.o)
  "_CGDisplayRelease", referenced from:
      +[ALDisplayHelper destroyDisplay:] in liballegro-static.a(osxgl.m.o)
      _create_display_fs in liballegro-static.a(osxgl.m.o)
  "_CGDisplaySetDisplayMode", referenced from:
      +[ALDisplayHelper destroyDisplay:] in liballegro-static.a(osxgl.m.o)
      _create_display_fs in liballegro-static.a(osxgl.m.o)
      _resize_display_fs in liballegro-static.a(osxgl.m.o)
  "_CGGetActiveDisplayList", referenced from:
      _osx_get_monitor_info in liballegro-static.a(system.m.o)
  "_CGGetDisplaysWithRect", referenced from:
      _osx_set_mouse_xy in liballegro-static.a(qzmouse.m.o)
  "_CGMainDisplayID", referenced from:
      __al_osx_get_num_display_modes in liballegro-static.a(system.m.o)
      _create_display_fs in liballegro-static.a(osxgl.m.o)
  "_CGSetLocalEventsSuppressionInterval", referenced from:
      _osx_init_mouse in liballegro-static.a(qzmouse.m.o)
  "_CGShieldingWindowLevel", referenced from:
      _create_display_fs in liballegro-static.a(osxgl.m.o)
  "_CPSEnableForegroundOperation", referenced from:
      _osx_sys_init in liballegro-static.a(system.m.o)
  "_CPSGetCurrentProcess", referenced from:
      _osx_sys_init in liballegro-static.a(system.m.o)
  "_CPSSetFrontProcess", referenced from:
      _osx_sys_init in liballegro-static.a(system.m.o)
  "_FLAC__StreamDecoderErrorStatusString", referenced from:
      _error_callback in liballegro_acodec-static.a(flac.c.o)
  "_FLAC__StreamDecoderInitStatusString", referenced from:
      _flac_open in liballegro_acodec-static.a(flac.c.o)
  "_FLAC__stream_decoder_delete", referenced from:
      _flac_open in liballegro_acodec-static.a(flac.c.o)
  "_FLAC__stream_decoder_finish", referenced from:
      _flac_open in liballegro_acodec-static.a(flac.c.o)
  "_FLAC__stream_decoder_flush", referenced from:
      _flac_open in liballegro_acodec-static.a(flac.c.o)
  "_FLAC__stream_decoder_init_stream", referenced from:
      _flac_open in liballegro_acodec-static.a(flac.c.o)
  "_FLAC__stream_decoder_new", referenced from:
      _flac_open in liballegro_acodec-static.a(flac.c.o)
  "_FLAC__stream_decoder_process_single", referenced from:
      _flac_open in liballegro_acodec-static.a(flac.c.o)
  "_FLAC__stream_decoder_process_until_end_of_metadata", referenced from:
      _flac_open in liballegro_acodec-static.a(flac.c.o)
  "_FLAC__stream_decoder_process_until_end_of_stream", referenced from:
      _flac_open in liballegro_acodec-static.a(flac.c.o)
  "_FLAC__stream_decoder_seek_absolute", referenced from:
      _flac_open in liballegro_acodec-static.a(flac.c.o)
  "_FSGetCatalogInfo", referenced from:
      -[AllegroAppDelegate applicationDidFinishLaunching:] in liballegro-static.a(osx_app_delegate.m.o)
      __al_osx_run_main in liballegro-static.a(osx_app_delegate.m.o)
  "_FT_Attach_File", referenced from:
      _al_load_ttf_font_stretch_f in liballegro_ttf-static.a(ttf.c.o)
  "_FT_Done_Face", referenced from:
      _ttf_destroy in liballegro_ttf-static.a(ttf.c.o)
  "_FT_Done_FreeType", referenced from:
      _al_shutdown_ttf_addon in liballegro_ttf-static.a(ttf.c.o)
  "_FT_Get_Char_Index", referenced from:
      _cache_glyphs in liballegro_ttf-static.a(ttf.c.o)
      _ttf_char_length in liballegro_ttf-static.a(ttf.c.o)
      _ttf_render_char in liballegro_ttf-static.a(ttf.c.o)
      _ttf_render in liballegro_ttf-static.a(ttf.c.o)
      _ttf_get_glyph_dimensions in liballegro_ttf-static.a(ttf.c.o)
      _ttf_get_glyph_advance in liballegro_ttf-static.a(ttf.c.o)
      _ttf_get_glyph in liballegro_ttf-static.a(ttf.c.o)
      ...
  "_FT_Get_First_Char", referenced from:
      _ttf_get_font_ranges in liballegro_ttf-static.a(ttf.c.o)
  "_FT_Get_Kerning", referenced from:
      _ttf_get_glyph_advance in liballegro_ttf-static.a(ttf.c.o)
      _ttf_get_glyph_worker in liballegro_ttf-static.a(ttf.c.o)
  "_FT_Get_Next_Char", referenced from:
      _ttf_get_font_ranges in liballegro_ttf-static.a(ttf.c.o)
  "_FT_Init_FreeType", referenced from:
      _al_init_ttf_addon in liballegro_ttf-static.a(ttf.c.o)
  "_FT_Load_Glyph", referenced from:
      _cache_glyph in liballegro_ttf-static.a(ttf.c.o)
  "_FT_Open_Face", referenced from:
      _al_load_ttf_font_stretch_f in liballegro_ttf-static.a(ttf.c.o)
  "_FT_Request_Size", referenced from:
      _al_load_ttf_font_stretch_f in liballegro_ttf-static.a(ttf.c.o)
  "_FT_Set_Pixel_Sizes", referenced from:
      _al_load_ttf_font_stretch_f in liballegro_ttf-static.a(ttf.c.o)
  "_GetProcessBundleLocation", referenced from:
      -[AllegroAppDelegate applicationDidFinishLaunching:] in liballegro-static.a(osx_app_delegate.m.o)
      __al_osx_run_main in liballegro-static.a(osx_app_delegate.m.o)
  "_IOCreatePlugInInterfaceForService", referenced from:
      _add_device in liballegro-static.a(hidjoy-10.4.m.o)
      __al_osx_hid_scan in liballegro-static.a(hidman.m.o)
  "_IOHIDDeviceCopyMatchingElements", referenced from:
      _device_add_callback in liballegro-static.a(hidjoy.m.o)
  "_IOHIDElementGetDevice", referenced from:
      _value_callback in liballegro-static.a(hidjoy.m.o)
  "_IOHIDElementGetLogicalMax", referenced from:
      _device_add_callback in liballegro-static.a(hidjoy.m.o)
  "_IOHIDElementGetLogicalMin", referenced from:
      _device_add_callback in liballegro-static.a(hidjoy.m.o)
  "_IOHIDElementGetName", referenced from:
      _device_add_callback in liballegro-static.a(hidjoy.m.o)
  "_IOHIDElementGetType", referenced from:
      _device_add_callback in liballegro-static.a(hidjoy.m.o)
  "_IOHIDElementGetUsage", referenced from:
      _device_add_callback in liballegro-static.a(hidjoy.m.o)
  "_IOHIDManagerClose", referenced from:
      _exit_joystick in liballegro-static.a(hidjoy.m.o)
  "_IOHIDManagerCopyDevices", referenced from:
      _init_joystick in liballegro-static.a(hidjoy.m.o)
  "_IOHIDManagerCreate", referenced from:
      _init_joystick in liballegro-static.a(hidjoy.m.o)
  "_IOHIDManagerGetTypeID", referenced from:
      _init_joystick in liballegro-static.a(hidjoy.m.o)
  "_IOHIDManagerOpen", referenced from:
      _init_joystick in liballegro-static.a(hidjoy.m.o)
  "_IOHIDManagerRegisterDeviceMatchingCallback", referenced from:
      _init_joystick in liballegro-static.a(hidjoy.m.o)
  "_IOHIDManagerRegisterDeviceRemovalCallback", referenced from:
      _init_joystick in liballegro-static.a(hidjoy.m.o)
  "_IOHIDManagerRegisterInputValueCallback", referenced from:
      _init_joystick in liballegro-static.a(hidjoy.m.o)
      _exit_joystick in liballegro-static.a(hidjoy.m.o)
  "_IOHIDManagerScheduleWithRunLoop", referenced from:
      _init_joystick in liballegro-static.a(hidjoy.m.o)
  "_IOHIDManagerSetDeviceMatchingMultiple", referenced from:
      _init_joystick in liballegro-static.a(hidjoy.m.o)
  "_IOHIDManagerUnscheduleFromRunLoop", referenced from:
      _exit_joystick in liballegro-static.a(hidjoy.m.o)
  "_IOHIDValueGetElement", referenced from:
      _value_callback in liballegro-static.a(hidjoy.m.o)
  "_IOHIDValueGetIntegerValue", referenced from:
      _value_callback in liballegro-static.a(hidjoy.m.o)
  "_IOIteratorNext", referenced from:
      _init_joystick in liballegro-static.a(hidjoy-10.4.m.o)
      __al_osx_hid_scan in liballegro-static.a(hidman.m.o)
  "_IOMasterPort", referenced from:
      __al_osx_hid_scan in liballegro-static.a(hidman.m.o)
  "_IOObjectGetClass", referenced from:
      _add_device in liballegro-static.a(hidjoy-10.4.m.o)
  "_IOObjectRelease", referenced from:
      _init_joystick in liballegro-static.a(hidjoy-10.4.m.o)
      __al_osx_hid_scan in liballegro-static.a(hidman.m.o)
  "_IORegistryEntryCreateCFProperties", referenced from:
      __al_osx_hid_scan in liballegro-static.a(hidman.m.o)
  "_IORegistryEntryGetParentEntry", referenced from:
      __al_osx_hid_scan in liballegro-static.a(hidman.m.o)
  "_IOServiceGetMatchingServices", referenced from:
      _init_joystick in liballegro-static.a(hidjoy-10.4.m.o)
      __al_osx_hid_scan in liballegro-static.a(hidman.m.o)
  "_IOServiceMatching", referenced from:
      _init_joystick in liballegro-static.a(hidjoy-10.4.m.o)
      __al_osx_hid_scan in liballegro-static.a(hidman.m.o)
  "_NSApp", referenced from:
      __al_osx_run_main in liballegro-static.a(osx_app_delegate.m.o)
      -[ALLEGMenuTarget show] in liballegro_dialog-static.a(osx_dialog.m.o)
      -[ALLEGMenuTarget showPopup] in liballegro_dialog-static.a(osx_dialog.m.o)
      -[ALLEGTargetManager onWindowChange:] in liballegro_dialog-static.a(osx_dialog.m.o)
      _osx_inhibit_screensaver in liballegro-static.a(system.m.o)
      +[ALDisplayHelper runFullScreenDisplay:] in liballegro-static.a(osxgl.m.o)
      _set_icons in liballegro-static.a(osxgl.m.o)
      ...
  "_NSAppKitVersionNumber", referenced from:
      __al_osx_get_joystick_driver in liballegro-static.a(hidjoy.m.o)
      _osx_set_clipboard_text in liballegro-static.a(osxclipboard.m.o)
      _osx_get_clipboard_text in liballegro-static.a(osxclipboard.m.o)
      _osx_has_clipboard_text in liballegro-static.a(osxclipboard.m.o)
  "_NSBitsPerPixelFromDepth", referenced from:
      _osx_set_opengl_pixelformat_attributes in liballegro-static.a(osxgl.m.o)
  "_NSDefaultRunLoopMode", referenced from:
      +[ALDisplayHelper runFullScreenDisplay:] in liballegro-static.a(osxgl.m.o)
  "_NSDeviceRGBColorSpace", referenced from:
      _NSImageFromAllegroBitmap in liballegro-static.a(system.m.o)
  "_NSFullScreenModeApplicationPresentationOptions", referenced from:
      -[ALOpenGLView enterFullScreenWindowMode] in liballegro-static.a(osxgl.m.o)
  "_NSHomeDirectory", referenced from:
      __al_osx_get_path in liballegro-static.a(system.m.o)
  "_NSMouseInRect", referenced from:
      __al_osx_mouse_generate_event in liballegro-static.a(qzmouse.m.o)
  "_NSPasteboardTypeString", referenced from:
      _osx_set_clipboard_text in liballegro-static.a(osxclipboard.m.o)
      _osx_get_clipboard_text in liballegro-static.a(osxclipboard.m.o)
      _osx_has_clipboard_text in liballegro-static.a(osxclipboard.m.o)
  "_NSSearchPathForDirectoriesInDomains", referenced from:
      __al_osx_get_path in liballegro-static.a(system.m.o)
  "_NSSelectorFromString", referenced from:
      +[ALDisplayHelper initialiseDisplay:] in liballegro-static.a(osxgl.m.o)
  "_NSStringPboardType", referenced from:
      _osx_set_clipboard_text in liballegro-static.a(osxclipboard.m.o)
      _osx_get_clipboard_text in liballegro-static.a(osxclipboard.m.o)
      _osx_has_clipboard_text in liballegro-static.a(osxclipboard.m.o)
  "_NSTemporaryDirectory", referenced from:
      __al_osx_get_path in liballegro-static.a(system.m.o)
  "_NSWindowDidBecomeMainNotification", referenced from:
      -[ALLEGTargetManager init] in liballegro_dialog-static.a(osx_dialog.m.o)
  "_NSWindowWillCloseNotification", referenced from:
      -[ALLEGTargetManager init] in liballegro_dialog-static.a(osx_dialog.m.o)
  "_OBJC_CLASS_$_NSAlert", referenced from:
      objc-class-ref in liballegro_dialog-static.a(osx_dialog.m.o)
  "_OBJC_CLASS_$_NSApplication", referenced from:
      objc-class-ref in liballegro-static.a(osx_app_delegate.m.o)
      objc-class-ref in liballegro-static.a(system.m.o)
  "_OBJC_CLASS_$_NSArray", referenced from:
      objc-class-ref in liballegro-static.a(osxgl.m.o)
      objc-class-ref in liballegro-static.a(osxclipboard.m.o)
  "_OBJC_CLASS_$_NSAutoreleasePool", referenced from:
      objc-class-ref in liballegro-static.a(osx_app_delegate.m.o)
      objc-class-ref in liballegro_dialog-static.a(osx_dialog.m.o)
      objc-class-ref in liballegro_audio-static.a(aqueue.m.o)
      objc-class-ref in liballegro-static.a(system.m.o)
      objc-class-ref in liballegro_image-static.a(macosx.m.o)
      objc-class-ref in liballegro-static.a(qzmouse.m.o)
      objc-class-ref in liballegro-static.a(osxgl.m.o)
      ...
  "_OBJC_CLASS_$_NSBitmapImageRep", referenced from:
      objc-class-ref in liballegro-static.a(system.m.o)
      objc-class-ref in liballegro_image-static.a(macosx.m.o)
  "_OBJC_CLASS_$_NSBundle", referenced from:
      objc-class-ref in liballegro-static.a(osx_app_delegate.m.o)
  "_OBJC_CLASS_$_NSCharacterSet", referenced from:
      objc-class-ref in liballegro_dialog-static.a(osx_dialog.m.o)
  "_OBJC_CLASS_$_NSColor", referenced from:
      objc-class-ref in liballegro_dialog-static.a(osx_dialog.m.o)
  "_OBJC_CLASS_$_NSCursor", referenced from:
      objc-class-ref in liballegro-static.a(osxgl.m.o)
  "_OBJC_CLASS_$_NSData", referenced from:
      objc-class-ref in liballegro_image-static.a(macosx.m.o)
  "_OBJC_CLASS_$_NSDate", referenced from:
      objc-class-ref in liballegro-static.a(osxgl.m.o)
  "_OBJC_CLASS_$_NSDictionary", referenced from:
      objc-class-ref in liballegro_dialog-static.a(osx_dialog.m.o)
      objc-class-ref in liballegro_image-static.a(macosx.m.o)
  "_OBJC_CLASS_$_NSEvent", referenced from:
      objc-class-ref in liballegro_dialog-static.a(osx_dialog.m.o)
      objc-class-ref in liballegro-static.a(system.m.o)
  "_OBJC_CLASS_$_NSFileManager", referenced from:
      objc-class-ref in liballegro-static.a(osx_app_delegate.m.o)
  "_OBJC_CLASS_$_NSFont", referenced from:
      objc-class-ref in liballegro_dialog-static.a(osx_dialog.m.o)
  "_OBJC_CLASS_$_NSImage", referenced from:
      objc-class-ref in liballegro-static.a(system.m.o)
      objc-class-ref in liballegro_image-static.a(macosx.m.o)
  "_OBJC_CLASS_$_NSLock", referenced from:
      objc-class-ref in liballegro_dialog-static.a(osx_dialog.m.o)
  "_OBJC_CLASS_$_NSMenu", referenced from:
      objc-class-ref in liballegro-static.a(osx_app_delegate.m.o)
      objc-class-ref in liballegro_dialog-static.a(osx_dialog.m.o)
  "_OBJC_CLASS_$_NSMenuItem", referenced from:
      objc-class-ref in liballegro-static.a(osx_app_delegate.m.o)
      objc-class-ref in liballegro_dialog-static.a(osx_dialog.m.o)
  "_OBJC_CLASS_$_NSMutableArray", referenced from:
      objc-class-ref in liballegro_dialog-static.a(osx_dialog.m.o)
  "_OBJC_CLASS_$_NSMutableDictionary", referenced from:
      objc-class-ref in liballegro-static.a(osxgl.m.o)
  "_OBJC_CLASS_$_NSMutableString", referenced from:
      objc-class-ref in liballegro_dialog-static.a(osx_dialog.m.o)
  "_OBJC_CLASS_$_NSNotificationCenter", referenced from:
      objc-class-ref in liballegro_dialog-static.a(osx_dialog.m.o)
  "_OBJC_CLASS_$_NSNumber", referenced from:
      objc-class-ref in liballegro-static.a(system.m.o)
      objc-class-ref in liballegro-static.a(osxgl.m.o)
      objc-class-ref in liballegro-static.a(hidjoy-10.4.m.o)
  "_OBJC_CLASS_$_NSObject", referenced from:
      _OBJC_CLASS_$_AllegroAppDelegate in liballegro-static.a(osx_app_delegate.m.o)
      _OBJC_CLASS_$_ALLEGFileDialog in liballegro_dialog-static.a(osx_dialog.m.o)
      _OBJC_CLASS_$_ALLEGAlertWrapper in liballegro_dialog-static.a(osx_dialog.m.o)
      _OBJC_CLASS_$_ALLEGMenuTarget in liballegro_dialog-static.a(osx_dialog.m.o)
      _OBJC_CLASS_$_ALLEGTargetManager in liballegro_dialog-static.a(osx_dialog.m.o)
      _OBJC_CLASS_$_ALSetWindowFrame in liballegro-static.a(osxgl.m.o)
      _OBJC_CLASS_$_ALDisplayHelper in liballegro-static.a(osxgl.m.o)
      ...
  "_OBJC_CLASS_$_NSOpenGLContext", referenced from:
      objc-class-ref in liballegro-static.a(osxgl.m.o)
  "_OBJC_CLASS_$_NSOpenGLPixelFormat", referenced from:
      objc-class-ref in liballegro-static.a(osxgl.m.o)
  "_OBJC_CLASS_$_NSOpenGLView", referenced from:
      _OBJC_CLASS_$_ALOpenGLView in liballegro-static.a(osxgl.m.o)
  "_OBJC_CLASS_$_NSOpenPanel", referenced from:
      objc-class-ref in liballegro_dialog-static.a(osx_dialog.m.o)
  "_OBJC_CLASS_$_NSPasteboard", referenced from:
      objc-class-ref in liballegro-static.a(osxclipboard.m.o)
  "_OBJC_CLASS_$_NSProcessInfo", referenced from:
      objc-class-ref in liballegro-static.a(osx_app_delegate.m.o)
  "_OBJC_CLASS_$_NSSavePanel", referenced from:
      objc-class-ref in liballegro_dialog-static.a(osx_dialog.m.o)
  "_OBJC_CLASS_$_NSScreen", referenced from:
      objc-class-ref in liballegro_dialog-static.a(osx_dialog.m.o)
      objc-class-ref in liballegro-static.a(system.m.o)
      objc-class-ref in liballegro-static.a(qzmouse.m.o)
      objc-class-ref in liballegro-static.a(osxgl.m.o)
  "_OBJC_CLASS_$_NSScrollView", referenced from:
      objc-class-ref in liballegro_dialog-static.a(osx_dialog.m.o)
  "_OBJC_CLASS_$_NSString", referenced from:
      objc-class-ref in liballegro_dialog-static.a(osx_dialog.m.o)
      objc-class-ref in liballegro-static.a(system.m.o)
      objc-class-ref in liballegro-static.a(qzmouse.m.o)
      objc-class-ref in liballegro-static.a(osxgl.m.o)
      objc-class-ref in liballegro-static.a(osxclipboard.m.o)
      objc-class-ref in liballegro-static.a(hidjoy-10.4.m.o)
  "_OBJC_CLASS_$_NSTextView", referenced from:
      _OBJC_CLASS_$_ALLEGLogView in liballegro_dialog-static.a(osx_dialog.m.o)
  "_OBJC_CLASS_$_NSThread", referenced from:
      objc-class-ref in liballegro-static.a(osx_app_delegate.m.o)
  "_OBJC_CLASS_$_NSTimer", referenced from:
      objc-class-ref in liballegro-static.a(osx_app_delegate.m.o)
  "_OBJC_CLASS_$_NSTrackingArea", referenced from:
      objc-class-ref in liballegro-static.a(osxgl.m.o)
  "_OBJC_CLASS_$_NSURL", referenced from:
      objc-class-ref in liballegro_dialog-static.a(osx_dialog.m.o)
  "_OBJC_CLASS_$_NSValue", referenced from:
      objc-class-ref in liballegro_dialog-static.a(osx_dialog.m.o)
      objc-class-ref in liballegro-static.a(osxgl.m.o)
  "_OBJC_CLASS_$_NSView", referenced from:
      objc-class-ref in liballegro-static.a(osxgl.m.o)
  "_OBJC_CLASS_$_NSWindow", referenced from:
      objc-class-ref in liballegro_dialog-static.a(osx_dialog.m.o)
      _OBJC_CLASS_$_ALWindow in liballegro-static.a(osxgl.m.o)
  "_OBJC_METACLASS_$_NSObject", referenced from:
      _OBJC_METACLASS_$_AllegroAppDelegate in liballegro-static.a(osx_app_delegate.m.o)
      _OBJC_METACLASS_$_ALLEGFileDialog in liballegro_dialog-static.a(osx_dialog.m.o)
      _OBJC_METACLASS_$_ALLEGAlertWrapper in liballegro_dialog-static.a(osx_dialog.m.o)
      _OBJC_METACLASS_$_ALLEGLogView in liballegro_dialog-static.a(osx_dialog.m.o)
      _OBJC_METACLASS_$_ALLEGMenuTarget in liballegro_dialog-static.a(osx_dialog.m.o)
      _OBJC_METACLASS_$_ALLEGTargetManager in liballegro_dialog-static.a(osx_dialog.m.o)
      _OBJC_METACLASS_$_ALWindow in liballegro-static.a(osxgl.m.o)
      ...
  "_OBJC_METACLASS_$_NSOpenGLView", referenced from:
      _OBJC_METACLASS_$_ALOpenGLView in liballegro-static.a(osxgl.m.o)
  "_OBJC_METACLASS_$_NSTextView", referenced from:
      _OBJC_METACLASS_$_ALLEGLogView in liballegro_dialog-static.a(osx_dialog.m.o)
  "_OBJC_METACLASS_$_NSWindow", referenced from:
      _OBJC_METACLASS_$_ALWindow in liballegro-static.a(osxgl.m.o)
  "_UpdateSystemActivity", referenced from:
      -[AllegroAppDelegate updateSystemActivity:] in liballegro-static.a(osx_app_delegate.m.o)
  "___CFConstantStringClassReference", referenced from:
      CFString in liballegro-static.a(osx_app_delegate.m.o)
      CFString in liballegro-static.a(osx_app_delegate.m.o)
      CFString in liballegro-static.a(osx_app_delegate.m.o)
      CFString in liballegro-static.a(osx_app_delegate.m.o)
      CFString in liballegro-static.a(osx_app_delegate.m.o)
      CFString in liballegro-static.a(osx_app_delegate.m.o)
      CFString in liballegro-static.a(osx_app_delegate.m.o)
      ...
  "__objc_empty_cache", referenced from:
      _OBJC_CLASS_$_AllegroAppDelegate in liballegro-static.a(osx_app_delegate.m.o)
      _OBJC_METACLASS_$_AllegroAppDelegate in liballegro-static.a(osx_app_delegate.m.o)
      _OBJC_METACLASS_$_ALLEGFileDialog in liballegro_dialog-static.a(osx_dialog.m.o)
      _OBJC_CLASS_$_ALLEGFileDialog in liballegro_dialog-static.a(osx_dialog.m.o)
      _OBJC_METACLASS_$_ALLEGAlertWrapper in liballegro_dialog-static.a(osx_dialog.m.o)
      _OBJC_CLASS_$_ALLEGAlertWrapper in liballegro_dialog-static.a(osx_dialog.m.o)
      _OBJC_CLASS_$_ALLEGLogView in liballegro_dialog-static.a(osx_dialog.m.o)
      ...
  "_alBufferData", referenced from:
      __openal_load_voice in liballegro_audio-static.a(openal.c.o)
      __openal_update in liballegro_audio-static.a(openal.c.o)
  "_alDeleteBuffers", referenced from:
      __openal_load_voice in liballegro_audio-static.a(openal.c.o)
      __openal_unload_voice in liballegro_audio-static.a(openal.c.o)
      __openal_start_voice in liballegro_audio-static.a(openal.c.o)
      __openal_stop_voice in liballegro_audio-static.a(openal.c.o)
  "_alDeleteSources", referenced from:
      __openal_load_voice in liballegro_audio-static.a(openal.c.o)
      __openal_unload_voice in liballegro_audio-static.a(openal.c.o)
      __openal_start_voice in liballegro_audio-static.a(openal.c.o)
      __openal_stop_voice in liballegro_audio-static.a(openal.c.o)
  "_alDistanceModel", referenced from:
      __openal_open in liballegro_audio-static.a(openal.c.o)
  "_alGenBuffers", referenced from:
      __openal_load_voice in liballegro_audio-static.a(openal.c.o)
      __openal_start_voice in liballegro_audio-static.a(openal.c.o)
  "_alGenSources", referenced from:
      __openal_load_voice in liballegro_audio-static.a(openal.c.o)
      __openal_start_voice in liballegro_audio-static.a(openal.c.o)
  "_alGetEnumValue", referenced from:
      __openal_allocate_voice in liballegro_audio-static.a(openal.c.o)
  "_alGetError", referenced from:
      __openal_open in liballegro_audio-static.a(openal.c.o)
      __openal_close in liballegro_audio-static.a(openal.c.o)
      __openal_load_voice in liballegro_audio-static.a(openal.c.o)
      __openal_unload_voice in liballegro_audio-static.a(openal.c.o)
      __openal_start_voice in liballegro_audio-static.a(openal.c.o)
      __openal_stop_voice in liballegro_audio-static.a(openal.c.o)
      __openal_get_voice_position in liballegro_audio-static.a(openal.c.o)
      ...
  "_alGetSourcei", referenced from:
      __openal_voice_is_playing in liballegro_audio-static.a(openal.c.o)
      __openal_get_voice_position in liballegro_audio-static.a(openal.c.o)
      __openal_update in liballegro_audio-static.a(openal.c.o)
  "_alGetString", referenced from:
      __openal_open in liballegro_audio-static.a(openal.c.o)
  "_alSourcePlay", referenced from:
      __openal_start_voice in liballegro_audio-static.a(openal.c.o)
      __openal_update in liballegro_audio-static.a(openal.c.o)
  "_alSourceQueueBuffers", referenced from:
      __openal_update in liballegro_audio-static.a(openal.c.o)
  "_alSourceStop", referenced from:
      __openal_stop_voice in liballegro_audio-static.a(openal.c.o)
      __openal_update in liballegro_audio-static.a(openal.c.o)
  "_alSourceUnqueueBuffers", referenced from:
      __openal_update in liballegro_audio-static.a(openal.c.o)
  "_alSourcef", referenced from:
      __openal_load_voice in liballegro_audio-static.a(openal.c.o)
      __openal_start_voice in liballegro_audio-static.a(openal.c.o)
  "_alSourcei", referenced from:
      __openal_load_voice in liballegro_audio-static.a(openal.c.o)
      __openal_set_voice_position in liballegro_audio-static.a(openal.c.o)
      __openal_update in liballegro_audio-static.a(openal.c.o)
  "_alcCloseDevice", referenced from:
      __openal_close in liballegro_audio-static.a(openal.c.o)
  "_alcCreateContext", referenced from:
      __openal_open in liballegro_audio-static.a(openal.c.o)
  "_alcDestroyContext", referenced from:
      __openal_close in liballegro_audio-static.a(openal.c.o)
  "_alcGetError", referenced from:
      __openal_open in liballegro_audio-static.a(openal.c.o)
      __openal_close in liballegro_audio-static.a(openal.c.o)
  "_alcMakeContextCurrent", referenced from:
      __openal_open in liballegro_audio-static.a(openal.c.o)
      __openal_close in liballegro_audio-static.a(openal.c.o)
  "_alcOpenDevice", referenced from:
      __openal_open in liballegro_audio-static.a(openal.c.o)
  "_kCFAllocatorDefault", referenced from:
      _init_joystick in liballegro-static.a(hidjoy.m.o)
      _CreateDeviceMatchingDictionary in liballegro-static.a(hidjoy.m.o)
      _al_get_opengl_proc_address in liballegro-static.a(extensions.c.o)
      __al_ogl_manage_extensions in liballegro-static.a(extensions.c.o)
      __al_osx_hid_scan in liballegro-static.a(hidman.m.o)
  "_kCFAllocatorNull", referenced from:
      _load_extension in liballegro-static.a(extensions.c.o)
  "_kCFRunLoopCommonModes", referenced from:
      __aqueue_allocate_recorder in liballegro_audio-static.a(aqueue.m.o)
      _stream_proc in liballegro_audio-static.a(aqueue.m.o)
  "_kCFRunLoopDefaultMode", referenced from:
      _stream_proc in liballegro_audio-static.a(aqueue.m.o)
      _init_joystick in liballegro-static.a(hidjoy.m.o)
      _exit_joystick in liballegro-static.a(hidjoy.m.o)
      +[ALJoystickHelper startQueues] in liballegro-static.a(hidjoy-10.4.m.o)
      +[ALJoystickHelper stopQueues] in liballegro-static.a(hidjoy-10.4.m.o)
  "_kCFTypeDictionaryKeyCallBacks", referenced from:
      _CreateDeviceMatchingDictionary in liballegro-static.a(hidjoy.m.o)
  "_kCFTypeDictionaryValueCallBacks", referenced from:
      _CreateDeviceMatchingDictionary in liballegro-static.a(hidjoy.m.o)
  "_kIOMasterPortDefault", referenced from:
      _init_joystick in liballegro-static.a(hidjoy-10.4.m.o)
  "_objc_msgSend", referenced from:
      -[AllegroAppDelegate setInhibitScreenSaver:] in liballegro-static.a(osx_app_delegate.m.o)
      -[AllegroAppDelegate dealloc] in liballegro-static.a(osx_app_delegate.m.o)
      -[AllegroAppDelegate application:openFile:] in liballegro-static.a(osx_app_delegate.m.o)
      -[AllegroAppDelegate applicationDidFinishLaunching:] in liballegro-static.a(osx_app_delegate.m.o)
      __al_osx_run_main in liballegro-static.a(osx_app_delegate.m.o)
      +[ALLEGFileDialog displayFileDialog:] in liballegro_dialog-static.a(osx_dialog.m.o)
      __al_show_native_file_dialog in liballegro_dialog-static.a(osx_dialog.m.o)
      ...
  "_objc_msgSendSuper2", referenced from:
      -[AllegroAppDelegate dealloc] in liballegro-static.a(osx_app_delegate.m.o)
      -[ALLEGLogView keyDown:] in liballegro_dialog-static.a(osx_dialog.m.o)
      -[ALLEGMenuTarget initWithMenu:] in liballegro_dialog-static.a(osx_dialog.m.o)
      -[ALLEGMenuTarget dealloc] in liballegro_dialog-static.a(osx_dialog.m.o)
      -[ALLEGTargetManager init] in liballegro_dialog-static.a(osx_dialog.m.o)
      -[ALLEGTargetManager dealloc] in liballegro_dialog-static.a(osx_dialog.m.o)
      -[ALWindow zoom:] in liballegro-static.a(osxgl.m.o)
      ...
  "_objc_msgSend_stret", referenced from:
      +[ALLEGLogView createNativeComponents:] in liballegro_dialog-static.a(osx_dialog.m.o)
      _osx_get_cursor_position in liballegro-static.a(system.m.o)
      __al_osx_mouse_generate_event in liballegro-static.a(qzmouse.m.o)
      _osx_set_mouse_xy in liballegro-static.a(qzmouse.m.o)
      -[ALOpenGLView reshape] in liballegro-static.a(osxgl.m.o)
      -[ALOpenGLView viewDidMoveToWindow] in liballegro-static.a(osxgl.m.o)
      -[ALOpenGLView viewDidChangeBackingProperties] in liballegro-static.a(osxgl.m.o)
      ...
  "_ov_clear", referenced from:
      __al_load_ogg_vorbis_f in liballegro_acodec-static.a(ogg.c.o)
      __al_load_ogg_vorbis_audio_stream_f in liballegro_acodec-static.a(ogg.c.o)
  "_ov_info", referenced from:
      __al_load_ogg_vorbis_f in liballegro_acodec-static.a(ogg.c.o)
      __al_load_ogg_vorbis_audio_stream_f in liballegro_acodec-static.a(ogg.c.o)
  "_ov_open_callbacks", referenced from:
      __al_load_ogg_vorbis_f in liballegro_acodec-static.a(ogg.c.o)
      __al_load_ogg_vorbis_audio_stream_f in liballegro_acodec-static.a(ogg.c.o)
  "_ov_pcm_total", referenced from:
      __al_load_ogg_vorbis_f in liballegro_acodec-static.a(ogg.c.o)
      __al_load_ogg_vorbis_audio_stream_f in liballegro_acodec-static.a(ogg.c.o)
  "_ov_read", referenced from:
      __al_load_ogg_vorbis_f in liballegro_acodec-static.a(ogg.c.o)
      __al_load_ogg_vorbis_audio_stream_f in liballegro_acodec-static.a(ogg.c.o)
  "_ov_time_seek_lap", referenced from:
      __al_load_ogg_vorbis_f in liballegro_acodec-static.a(ogg.c.o)
      __al_load_ogg_vorbis_audio_stream_f in liballegro_acodec-static.a(ogg.c.o)
  "_ov_time_tell", referenced from:
      __al_load_ogg_vorbis_f in liballegro_acodec-static.a(ogg.c.o)
      __al_load_ogg_vorbis_audio_stream_f in liballegro_acodec-static.a(ogg.c.o)
  "_ov_time_total", referenced from:
      __al_load_ogg_vorbis_f in liballegro_acodec-static.a(ogg.c.o)
      __al_load_ogg_vorbis_audio_stream_f in liballegro_acodec-static.a(ogg.c.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: *** [bin/krampushack] Error 1

I'm guessing that I also need to link other dependencies statically as well, but I don't know which ones are needed. :-/

Any help?

Elias
Member #358
May 2000

Try adding this to your commandline, and should be easy to Google others that are missing (just search for a function name and the first result usually tells you the framework): -framework CoreGraphics -framework QuartzCore -framework AudioToolbox -framework OpenAL -framework Foundation -framework CoreFoundation -framework CoreServices -framework IOKit -framework AppKit

--
"Either help out or stop whining" - Evert

Peter Hull
Member #1,136
March 2001

Does pkg-config work?

Mark Oates
Member #1,146
March 2001
avatar

Thanks, Elias, that seems to have resolved most of the problems and pointed me in the right direction.

There were a few errors that remained and I managed to squash the majority of them with

-lopus -logg -lvorbisfile -lvorbis -lfreetype

After which I was stuck with missing flac:

g++ -std=gnu++11 obj/controllers/ai_kid_controller.o obj/controllers/audio_controller.o obj/controllers/player_krampus_controller.o obj/emitters/user_event_emitter.o obj/entities/background_entity.o obj/entities/damage_zone_entity.o obj/entities/door_entity.o obj/entities/entity_base.o obj/entities/item_entity.o obj/entities/kid_entity.o obj/entities/krampus_entity.o obj/factories/dialogue_factory.o obj/factories/entity_factory.o obj/factories/scene_factory.o obj/factories/storyboard_factory.o obj/generators/kid_name_generator.o obj/helpers/game_play_screen_state_helper.o obj/helpers/scene_collection_helper.o obj/helpers/scene_collision_helper.o obj/models/camera.o obj/models/hud.o obj/models/inventory.o obj/models/item_dialogue.o obj/models/naughty_list.o obj/models/scene.o obj/screens/game_play_screen.o obj/screens/storyboard_screen.o obj/screens/title_screen.o obj/sprite_sheet.o programs/krampushack.cpp -o bin/krampushack -lallegro_flare-0.8.8wip -lallegro_color-static -lallegro_font-static -lallegro_ttf-static -lallegro_dialog-static -lallegro_audio-static -lallegro_acodec-static -lallegro_primitives-static -lallegro_image-static -lallegro_main-static -lallegro-static -framework CoreGraphics -framework QuartzCore -framework AudioToolbox -framework OpenAL -framework Foundation -framework CoreFoundation -framework CoreServices -framework IOKit -framework AppKit -lopus -logg -lvorbisfile -lvorbis -lfreetype -L/Users/markoates/Repos/allegro_flare/lib -L/Users/markoates/Repos/allegro5/build/lib -framework OpenGL -I/Users/markoates/Repos/allegro_flare/include -I/Users/markoates/Repos/allegro5/build/include -I./include
Undefined symbols for architecture x86_64:
  "_FLAC__StreamDecoderErrorStatusString", referenced from:
      _error_callback in liballegro_acodec-static.a(flac.c.o)
  "_FLAC__StreamDecoderInitStatusString", referenced from:
      _flac_open in liballegro_acodec-static.a(flac.c.o)
  "_FLAC__stream_decoder_delete", referenced from:
      _flac_open in liballegro_acodec-static.a(flac.c.o)
  "_FLAC__stream_decoder_finish", referenced from:
      _flac_open in liballegro_acodec-static.a(flac.c.o)
  "_FLAC__stream_decoder_flush", referenced from:
      _flac_open in liballegro_acodec-static.a(flac.c.o)
  "_FLAC__stream_decoder_init_stream", referenced from:
      _flac_open in liballegro_acodec-static.a(flac.c.o)
  "_FLAC__stream_decoder_new", referenced from:
      _flac_open in liballegro_acodec-static.a(flac.c.o)
  "_FLAC__stream_decoder_process_single", referenced from:
      _flac_open in liballegro_acodec-static.a(flac.c.o)
  "_FLAC__stream_decoder_process_until_end_of_metadata", referenced from:
      _flac_open in liballegro_acodec-static.a(flac.c.o)
  "_FLAC__stream_decoder_process_until_end_of_stream", referenced from:
      _flac_open in liballegro_acodec-static.a(flac.c.o)
  "_FLAC__stream_decoder_seek_absolute", referenced from:
      _flac_open in liballegro_acodec-static.a(flac.c.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: *** [bin/krampushack] Error 1

and ended up needing to brew install flac to get the libraries into place, and link with -lflac and it worked like a charm!

___

Does pkg-config work?

Hmm, I'm not familiar with pkg-config. :/ It looks like it could be very useful if I knew how to use it.

___

[edit:]

Ugh. It compiles, but now it doesn't look like it's backward compatible:

{"name":"610739","src":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/2\/6\/26a312645fb93b23c4cf49bbb53be4bb.png","w":435,"h":185,"tn":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/2\/6\/26a312645fb93b23c4cf49bbb53be4bb"}610739

-koro-
Member #16,207
February 2016

For the backwards compatibility you can try
-DCMAKE_OSX_DEPLOYMENT_TARGET=10.6
(or other version)
I use that and it works fine on 10.9, but I don't know how it will work in 10.11 since it may not have the necessary frameworks for backwards compatibility.

BTW to compile statically in OS X my method is to compile allegro from source. I use cmake with -G Xcode -DSHARED=0 -DCMAKE_OSX_DEPLOYMENT_TARGET=10.6
I also disable some unwanted options to avoid hassle with the dependencies:
-DWANT_FLAC=0 -DWANT_VORBIS=0 -DWANT_TREMOR=0 -DWANT_MODAUDIO=0 -DWANT_PHYSFS=0
then xcodebuild -config Release -target install build

I previously built the dependencies statically, which wasn't as easy as I expected for some reason (freetype was particularly annoying, but I managed to get it working using the following flags in cmake: DWITH_ZLIB=on -DWITH_HarfBuzz=off -DWITH_BZip2=off -DCMAKE_OSX_DEPLOYMENT_TARGET=10.6),
and then xcodebuild as before.

For some reason I had to compile zlib statically as well for backwards compatibility (shouldn't be necessary, but I kept getting some issues in earlier versions of OS X).

Finally to compile my code I create a blank XCode project, I add all the static allegro libs + dependencies plus these frameworks:
AppKit, OpenGL, OpenAL, IOKit, CoreFoundation, AudioToolbox, ApplicationServices.

In the build settings you can set OS X Deployment Target to 10.6 and maybe tune some other things that may cause trouble when you try to compile (i don't remember).

That's it, it should work.

Another way is using cmake + xcodebuild, you can check my CMakeLists from https://github.com/koro-xx/Watson for instance.

Mark Oates
Member #1,146
March 2001
avatar

Is there a way to get, at runtime, the OSX_DEPLOYMENT_TARGET that was used Something like al_get_osx_deployment_target()?

Also, I just tried

allegro5/build-macOS-10.6 $> cmake -DCMAKE_OSX_DEPLOYMENT_TARGET=10.6 -DSHARED=0 ..

Which worked w/o a problem. By the time I got to make

allegro5/build-macOS-10.6 $> make

It's not able to find QuickTime.h.

...
[  8%] Building C object CMakeFiles/allegro.dir/src/macosx/hidjoy.m.o
In file included from /Users/markoates/Repos/allegro5/src/macosx/hidjoy.m:19:
In file included from /Users/markoates/Repos/allegro5/include/allegro5/allegro.h:73:
/Users/markoates/Repos/allegro5/include/allegro5/platform/alosx.h:43:12: fatal error:
      'QuickTime/QuickTime.h' file not found
   #import <QuickTime/QuickTime.h>
           ^
1 error generated.
make[2]: *** [CMakeFiles/allegro.dir/src/macosx/hidjoy.m.o] Error 1
make[1]: *** [CMakeFiles/allegro.dir/all] Error 2
make: *** [all] Error 2

I think it's possible I need a different QuickTime for this version?

SiegeLord
Member #7,827
October 2006
avatar

You can just remove that include, it isn't actually used. This is already done in the most recent version of Allegro.

"For in much wisdom is much grief: and he that increases knowledge increases sorrow."-Ecclesiastes 1:18
[SiegeLord's Abode][Codes]:[DAllegro5]:[RustAllegro]

Mark Oates
Member #1,146
March 2001
avatar

SiegeLord said:

You can just remove that include, it isn't actually used. This is already done in the most recent version of Allegro.

Haha, I made a branch to remove the include, but then realized the newest allegro didn't have it, so I did a git pull and built the latest version. :)

I used:

allegro5/build-macOS-10.6 $> cmake -DCMAKE_OSX_DEPLOYMENT_TARGET=10.6 -DSHARED=0 ..

and make worked (with a few warnings)

I then completely rebuilt allegro_flare and then built krampushack with the following folders:

# here are the directories of the projects
LIBS_ROOT=/Users/markoates/Repos
ALLEGRO_DIR=$(LIBS_ROOT)/allegro5/build-macOS-10.6
ALLEGRO_FLARE_DIR=$(LIBS_ROOT)/allegro_flare


# these are the names of the libs you are linking
ALLEGRO_FLARE_LIB=allegro_flare-0.8.8wip
ALLEGRO_LIBS=-lallegro_color-static -lallegro_font-static -lallegro_ttf-static -lallegro_dialog-static -lallegro_audio-static -lallegro_acodec-static -lallegro_primitives-static -lallegro_image-static -lallegro_main-static -lallegro-static
FRAMEWORKS=-framework CoreGraphics -framework QuartzCore -framework AudioToolbox -framework OpenAL -framework Foundation -framework CoreFoundation -framework CoreServices -framework IOKit -framework AppKit -framework OpenGL


bin/krampushack: programs/krampushack.cpp $(OBJECTS)
	g++ -std=gnu++11 $(OBJECTS) $< -o $@ -l$(ALLEGRO_FLARE_LIB) $(ALLEGRO_LIBS) $(OTHER_LIBS) $(FRAMEWORKS) -L$(ALLEGRO_FLARE_DIR)/lib -L$(ALLEGRO_DIR)/lib $(OPENGL_LIB) -I$(ALLEGRO_FLARE_DIR)/include -I$(ALLEGRO_DIR)/include -I./include

It runs on my computer (now with appropriate scaling for retina display!) but when I sent it to my friend, it created the same error message:
{"name":"26a312645fb93b23c4cf49bbb53be4bb.png","src":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/2\/6\/26a312645fb93b23c4cf49bbb53be4bb.png","w":435,"h":185,"tn":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/2\/6\/26a312645fb93b23c4cf49bbb53be4bb"}26a312645fb93b23c4cf49bbb53be4bb.png

:(

Go to: