0
在我的iPhone項目中,我有一個名爲arm_asm_stub.S的程序集文件,其中包含我需要從我的項目中稱爲main.c的另一個文件中調用的方法。當我不#包括在我的main.c文件的頂部文件,我沒有得到任何編譯錯誤,但我得到的鏈接錯誤:在iPhone項目中編譯程序集(.S)文件
Undefined symbols for architecture armv7:
"_execute_arm_translate", referenced from:
_iphone_main in main.o
然而,當我嘗試#包括文件在main.c中的頂部,Xcode使用鏘編譯arm_asm_stub.S,所以我得到了一堆錯誤,那些中沒有出現的時候,我不將文件#包括如:
unknown type name 'ldr'
expected identifier or '('
use of undeclared identifier 'sp'
Xcode如何與其餘項目分開編譯這個文件?