I’m having exactly the same issue with 4.5.5p5. Building and running to a hardware iPhone works fine; trying to build towards the simulator fails with the list of linker errors I’ve pasted below. Looks like the project is missing a link to a pretty basic system lib.
This is obviously an issue with the project built by Unity, rather than an issue with XCode - I upgraded Unity to 4.5.5p5 today, and everything was happy until I did that.
Undefined symbols for architecture i386:
“_closedir$UNIX2003”, referenced from:
_find_in_dir in libiPhone-lib.a(mono-io-portability.o)
_mono_portability_find_file in libiPhone-lib.a(mono-io-portability.o)
_g_dir_rewind in libiPhone-lib.a(libeglib_la-gdir-unix.o)
_g_dir_close in libiPhone-lib.a(libeglib_la-gdir-unix.o)
“_fdopen$UNIX2003”, referenced from:
_try_addr2line in libiPhone-lib.a(profiler.o)
_mono_disassemble_code in libiPhone-lib.a(helpers.o)
_mono_compile_assembly in libiPhone-lib.a(aot-compiler.o)
“_fopen$UNIX2003”, referenced from:
_GetLogicalDriveStrings in libiPhone-lib.a(io.o)
_GetDriveType in libiPhone-lib.a(io.o)
_mono_main in libiPhone-lib.a(driver.o)
_mono_profiler_install_simple in libiPhone-lib.a(profiler.o)
_load_profile_files in libiPhone-lib.a(aot-compiler.o)
_mono_compile_assembly in libiPhone-lib.a(aot-compiler.o)
_mono_xdebug_init in libiPhone-lib.a(aot-compiler.o)
…
“_fputs$UNIX2003”, referenced from:
_mini_regression in libiPhone-lib.a(driver.o)
_mono_print_thread_dump_internal in libiPhone-lib.a(mini-exceptions.o)
_asm_writer_emit_bytes in libiPhone-lib.a(image-writer.o)
“_fwrite$UNIX2003”, referenced from:
_ipc_connect in libiPhone-lib.a(attach.o)
_receiver_thread in libiPhone-lib.a(attach.o)
_emit_marshal_safehandle in libiPhone-lib.a(marshal.o)
_emit_marshal_handleref in libiPhone-lib.a(marshal.o)
_parse_debug_options in libiPhone-lib.a(driver.o)
_mini_regression in libiPhone-lib.a(driver.o)
_mini_usage_jitdeveloper in libiPhone-lib.a(driver.o)
…
“_mktime$UNIX2003”, referenced from:
_ves_icall_System_CurrentSystemTimeZone_GetTimeZoneData in libiPhone-lib.a(icall.o)
“_nanosleep$UNIX2003”, referenced from:
__wapi_handle_spin in libiPhone-lib.a(handles.o)
_SleepEx in libiPhone-lib.a(wthreads.o)
__wapi_handle_spin in libiPhone-lib.a(events.o)
__wapi_handle_spin in libiPhone-lib.a(processes.o)
_collection_thread in libiPhone-lib.a(collection.o)
__wapi_handle_spin in libiPhone-lib.a(shared.o)
_pthread_mutex_timedlock in libiPhone-lib.a(mono-mutex.o)
…
“_opendir$INODE64$UNIX2003”, referenced from:
_mono_portability_find_file in libiPhone-lib.a(mono-io-portability.o)
_g_dir_open in libiPhone-lib.a(libeglib_la-gdir-unix.o)
_g_dir_rewind in libiPhone-lib.a(libeglib_la-gdir-unix.o)
“_readdir$INODE64”, referenced from:
_find_in_dir in libiPhone-lib.a(mono-io-portability.o)
_g_dir_read_name in libiPhone-lib.a(libeglib_la-gdir-unix.o)
“_recv$UNIX2003”, referenced from:
_recv_length in libiPhone-lib.a(debugger-agent.o)
“_send$UNIX2003”, referenced from:
__wapi_send in libiPhone-lib.a(sockets.o)
_wapi_sendfile in libiPhone-lib.a(sockets.o)
_transport_handshake in libiPhone-lib.a(debugger-agent.o)
_transport_send in libiPhone-lib.a(debugger-agent.o)
“_setenv$UNIX2003”, referenced from:
_g_setenv in libiPhone-lib.a(libeglib_la-gmisc-unix.o)
“_sigaltstack$UNIX2003”, referenced from:
_mono_setup_altstack in libiPhone-lib.a(mini-exceptions.o)
_mono_free_altstack in libiPhone-lib.a(mini-exceptions.o)
“_sleep$UNIX2003”, referenced from:
_GC_sleep in libiPhone-lib.a(pthread_support.o)
“_strerror$UNIX2003”, referenced from:
_errno_to_WSA in libiPhone-lib.a(error.o)
_g_strerror in libiPhone-lib.a(libeglib_la-gstr.o)
_mono_assembly_load_reference in libiPhone-lib.a(assembly.o)
_ipc_connect in libiPhone-lib.a(attach.o)
_mono_image_strerror in libiPhone-lib.a(image.o)
_ves_icall_System_Security_Cryptography_RNGCryptoServiceProvider_RngGetBytes in libiPhone-lib.a(rand.o)
_g_dir_open in libiPhone-lib.a(libeglib_la-gdir-unix.o)
…
“_strftime$UNIX2003”, referenced from:
_ves_icall_System_CurrentSystemTimeZone_GetTimeZoneData in libiPhone-lib.a(icall.o)
“_system$UNIX2003”, referenced from:
_mono_disassemble_code in libiPhone-lib.a(helpers.o)
_compile_asm in libiPhone-lib.a(aot-compiler.o)
_mono_draw_graph in libiPhone-lib.a(graph.o)
“_unsetenv$UNIX2003”, referenced from:
_g_unsetenv in libiPhone-lib.a(libeglib_la-gmisc-unix.o)
“_waitpid$UNIX2003”, referenced from:
_waitfor_pid in libiPhone-lib.a(processes.o)
_process_wait in libiPhone-lib.a(processes.o)
_g_spawn_command_line_sync in libiPhone-lib.a(libeglib_la-gspawn.o)
_g_spawn_async_with_pipes in libiPhone-lib.a(libeglib_la-gspawn.o)
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)