The messages followed by "Reason: Image not found"
Post
Replies
Boosts
Views
Activity
Additional info:
Both iMac and M1 MacBook otool info are:
***:
/lib/usr/libSystem.B.dylib
locate libSystem.B.dylib
/application/Xcode/xxxxxxxxxxxxxxxxxxxxxxxxx/libSsytem.B.dylib
And I tried -lSystem -L/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/lib posted on the other questions and no luck.
On the iMac clang without any options like clang -o *** *.c
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
For those who might have the same issue:
1 It's a problem of Big sur or xcode, I refresh my disk with brand new big sur 11.1 and no problem at all.
2 I am disappointed with Apple support because they transferred my case and no one was able to handle it.
3 Apple guys in here may think my question is stupiid they just didn't want to answer.