Post

Replies

Boosts

Views

Activity

Reply to Command line c code running error - dyld: Library not loaded: usr/lib/libSystem.B.dylib
In case someone can help: 1 All the basic c code can be compiled and ran on iMac(Big sur 11.1) without additional lib (clang -o mycode mycode1.c mycode2.c) 2 M1 macbook(Big sur 11.1) can run basic helloworld.c binary code but failed when I test binary with multi c code files, like clang -o mycode mycode1.c mycode2.c 3 Both iMac and M1 macbook air don't have any compiling issues 4 Error message "Library not loaded: usr/lib/libSystem.B.dylib" "Reason: Image not found" 5 otool -L mycode on both iMac and M1 macbook Air: "/lib/usr/libSystem.B.dylib" 6 locate libSystem.B.dylib on both iMac and M1 macbook Air: /application/xcode.app/xxxxxxx/appletvos(watchos/iphoneos)/xxxxxxxxxxxxxxxxx/libSystem.B.dylib 7 M1 installed xcode twice, and clang - 1200.0.32.28, ld64-609.8
Dec ’20