我正在尝试使用以下链接器命令创建可执行文件:
/path/to/ld64/i686-apple-darwin9-ld64 -ObjC -dead_strip -L/ -o ../someoutput -exported_symbol _main -Z -F/full/path/to/frameworks -lgcc -lgcc_s.1 -arch arm -lstdc++.6 -lcrt1.o -lSystem.B -lz -lobjc -framework CoreFoundation -framework UIKit -framework MobileCoreServices -framework CoreGraphics -framework Foundation -framework SystemConfiguration -framework AudioToolbox -framework CFNetwork -framework QuartzCore -framework OpenGLES -framework CoreLocation -framework CoreMedia -framework CoreVideo -framework AVFoundation -framework Security
然而,我得到一些警告,如下面给出的那些警告,之后我收到一个致命的错误,这对我来说没有任何意义:
ld warning: bad symbol version: $ld$hide$os2.1$_OBJC_CLASS_$_NSURL in dylib /full/path/to/CoreFoundation.framework/CoreFoundation
ld warning: bad symbol version: $ld$hide$os2.1$_OBJC_METACLASS_$_NSURL in dylib /full/path/to/CoreFoundation.framework/CoreFoundation
ld warning: bad symbol version: $ld$hide$os2.2$_OBJC_CLASS_$_NSURL in dylib /full/path/to/CoreFoundation.framework/CoreFoundation
ld warning: bad symbol version: $ld$add$os2.2$_OBJC_CLASS_$_NSURL in dylib /full/path/to/Foundation.framework/Foundation
ld warning: bad symbol version: $ld$add$os2.2$_OBJC_METACLASS_$_NSURL in dylib /full/path/to/Foundation.framework/Foundation
ld warning: bad symbol version: $ld$add$os3.0$_OBJC_CLASS_$_NSURL in dylib /full/path/to/Foundation.framework/Foundation
ld warning: bad symbol version: $ld$add$os3.0$_OBJC_METACLASS_$_NSURL in dylib /full/path/to/Foundation.framework/Foundation
ld warning: bad symbol version: $ld$add$os3.1$_OBJC_CLASS_$_NSURL in dylib /full/path/to/Foundation.framework/Foundation
Undefined symbols:
"_main", referenced from:
_main$non_lazy_ptr in crt1.o
ld: symbol(s) not found
这是什么意思?我该如何解决这个问题?