iPhone - Why can the compiler not find some includes when building for ARM architecture?

前端 未结 4 1571
故里飘歌
故里飘歌 2021-01-05 18:58

I am trying to make use of a C library in an iPhone project. I am very green with iPhone development. My Library

I have been battling for days now to try and get th

4条回答
  •  囚心锁ツ
    2021-01-05 19:18

    With Xcode 4.6, things have changed a bit. Here is the script I am using the convert some C code to ASM so that one can view the output of clang for armv7 (thumb2).

    #!/bin/bash
    
    DEVROOT=/Applications/Xcode.app/Contents/Developer
    SDK=$DEVROOT/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.1.sdk
    CLANG=$DEVROOT/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang
    
    $CLANG \
    -x c -arch armv7 \
    -std=gnu99 \
    -Os \
    -isysroot $SDK \
    -S code.c -o code.s
    

    Take a look at the generated .s to see the ARM ASM output.

提交回复
热议问题