In my iPhone project, I have an assembly file named arm_asm_stub.S, which contains a method I need to call from another file in my project called main.c. When I don't #include the file at the top of my main.c file, I get no build errors, but I do get the linker error:
Undefined symbols for architecture armv7:
"_execute_arm_translate", referenced from:
_iphone_main in main.o
However, when I attempt to #include the file at the top of main.c, Xcode uses Clang to compile arm_asm_stub.S and so I get a bunch of errors, ones that don't appear when I don't #include the file such as:
unknown type name 'ldr'
expected identifier or '('
use of undeclared identifier 'sp'
How can Xcode compile this one file separately than the rest of the project?