• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Xcode's default project layout causes $SRCROOT to be wrong.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Xcode's default project layout causes $SRCROOT to be wrong.


  • Subject: Xcode's default project layout causes $SRCROOT to be wrong.
  • From: Gavin Stokes <email@hidden>
  • Date: Tue, 02 Oct 2012 17:50:52 -0700

We were having trouble getting the compiler to find some headers.  I
realized that it's because Xcode is putting the xcodeproj file outside
the directory that contains the source.  It appears to derive $SRCROOT
from the project file's location.

This is what you get when you generate a new project:

TestProject
    TestProject
        appDelegate.h
        appDelegate.m
        other stuff
    TestProject.xcodeproj

So in build settings, $SRCROOT is resolved to
/volumes/something/TestProject, when in fact it should be
/volumes/something/TestProject/TestProject.

So you end up having to manually add /TestProject to every search path.

Can anyone shed some light on this design?  Thanks!

Gavin
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Xcode's default project layout causes $SRCROOT to be wrong.
      • From: email@hidden
    • Re: Xcode's default project layout causes $SRCROOT to be wrong.
      • From: Stephen Kay <email@hidden>
  • Prev by Date: Re: Linker is complaining that a directory isn't found, but nobody said to look for it.
  • Next by Date: Re: Custom Target in Xcode?
  • Previous by thread: Re: Linker is complaining that a directory isn't found, but nobody said to look for it.
  • Next by thread: Re: Xcode's default project layout causes $SRCROOT to be wrong.
  • Index(es):
    • Date
    • Thread