Dyld: library not loaded: /usr/lib/libc++abi.dylib

I built my project on xcode 4.2.

I chose the iPhone 4.3 simulator and am creating a project.

Then an error occurred.

dyld: Library not loaded: /usr/lib/libc++abi.dylib Referenced from: /Users/Player/Library/Application Support/iPhone Simulator/4.3.2/Applications/CF49143F-07C9-4609-AADB-82DD3AEAF6D9/Mahjang.app/Mahjang Reason: image not found 

How can I solve this problem?

You need your help.

+4
source share
2 answers

I also came across this: installed Xcode 4.2 on Snow Leopard and ran my application on a simulator. 5.0 works, but makes it work in Portrait mode (separate release). The immediate problem was all 4.x simulators that worked perfectly under Xcode 4.1, loaded the application into the Default.png splash screen, and then just crashed, with a demo:

 int 3 nop 

And the stack trace shows __dyld_dyld_fatal_error. Looking at gdb showed the most useful information posted in the question above.

Copying this llvm link to libC ++ abi.dylib to / usr / lib works, but there is a safer solution:

Answer: Add -Wl, -no_implicit_dylibs to the "Other linker flags" in the build settings.

+12
source

Here is what I learned. Download the zip from the URL below.

http://howardhinnant.imtqy.com/libcppabi.zip

cp cxxabi.h in / usr / include and cp libC ++ abi.dylib in / usr / lib. Your simulator should now work.

The URL seems a little scared, very inanimate to me. But I got it from http://libcxx.llvm.org/ , so I'm going to say that it is trustworthy. I don’t know what story is here, why it is necessary.

+6
source

Source: https://habr.com/ru/post/1381838/


All Articles