因此,我试图让ObjCMongoDb在iOS应用程序中运行,但是我一直收到这个错误。
ignoring file /Users/user/Documents/Programming/ObjCMongoDB/ObjCMongoDB.framework/ObjCMongoDB, file was built for unsupported file format ( 0xcf 0xfa 0xed 0xfe 0x 7 0x 0 0x 0 0x 1 0x 3 0x 0 0x 0 0x 0 0x 6 0x 0 0x 0 0x 0 ) which is not the architecture being linked (armv7): /Users/user/Documents/Programming/ObjCMongoDB/ObjCMongoDB.framework/ObjCMongoDB
Undefined symbols for architecture armv7:
"_OBJC_CLASS_$_BSONDecoder", referenced from:
objc-class-ref in MongoDbConnection.o
"_OBJC_CLASS_$_MongoKeyedPredicate", referenced from:
objc-class-ref in MongoDbConnection.o
"_OBJC_CLASS_$_MongoUpdateRequest", referenced from:
objc-class-ref in MongoDbConnection.o
"_OBJC_CLASS_$_MongoConnection", referenced from:
objc-class-ref in MongoDbConnection.o
ld: symbol(s) not found for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)我觉得这意味着框架不是为iOS编译的,而是为Mac编译的。
有人知道如何将ObjCMongoDb集成到iOS应用程序中吗?
谢谢!
发布于 2013-08-20 02:23:41
要在iOS上使用框架,您需要将其构建为一个静态库,而作为ObjCMongoDB一部分的Xcode项目并没有提供这样的方法。
最简单的方法是遵循Mac入门的说明,它在iOS上应该同样有效。
https://stackoverflow.com/questions/18325533
复制相似问题