项目需要,在win7下装了一个cygwin,利用cygwin生成一个.a的静态库文件,把.a文件和相关的头文件加载到Xcode的工程里,提示错误
ld: warning: ignoring file ./../../libtest.a, file was built for archive which is not the architecture being linked (i386) Undefined symbols for architecture i386: "_SignOrder",
referenced from: -[TestAppAppDelegate application:didFinishLaunchingWithOptions:] in TestAppAppDelegate.o ld: symbol(s) not found for architecture i386 collect2: ld returned 1 exit status
什么原因?
我在网上查说是架构的原因,苹果模拟器是arm6 arm7架构,在cygwin下是不是X86架构的,如何修改?
------解决方案--------------------
1、需要交叉编译器来编译
2、cygwin生成的.a文件是ELF格式的,而ios是mach-0格式。
------解决方案--------------------
把代码拿到苹果的系统里,编译一下,就可以了啊