Compiling (no linking) for a non-Apple target?

  • I use Xcode as an editor for my non-Mac/iOS projects as well, targeting small embedded processors. Usually I build via Makefile and a version of GCC for my target.

    But a lot of the code is generic C/C++. With some judicious use of the preprocessor, I should be able to compile the bulk of it with clang, and thereby get code completion support from Xcode, too.

    Note that it doesn't have to link, just compile with clang. I'll edit my headers as necessary to avoid target-specific extensions to the language.

    Unfortunately, the headers used by my target conflict with a lot of standard C headers (stdint.h, for example). Is it possible to configure Xcode to ignore all the OS X & iOS SDKs, and give it search paths for my target, and have compile? I tried removing the BaseSDK, but it presume an empty Base SDK means "current OS".

    Thanks,

    --
    Rick
  • In Xcode build settings, click on Base SDK then select "Other". Here type the path of your custom SDK (header, etc.).

    You can also set, in Xcode settings, your "Header search path" and "Library search path"

    Luca.

    ------------------------------------------------------
    All problems in computer science can be solved by another level of indirection, except for the problem of too many layers of indirection.

    – David J. Wheeler

    On May 22, 2013, at 7:16 AM, Rick Mann <rmann...> wrote:

    > <a_ciciriello...>
  • On May 21, 2013, at 23:22 , Luca Ciciriello <luca_ciciriello...> wrote:

    > In Xcode build settings, click on Base SDK then select "Other". Here type the path of your custom SDK (header, etc.).

    Unfortunately, when I do that, Xcode refuses to build. It says:

    "The run destination My Mac 64–bit is not valid for Running the scheme 'AmandaOSSim'."

    I don't know how to affect the run destination.

    --
    Rick
previous month may 2013 next month
MTWTFSS
    1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30 31    
Go to today