Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

printz

macrumors regular
Original poster
Dec 23, 2012
218
0
In my instance I'm using Xcode 5 and programming a command-line tool. I'm not sure if it happens with Xcode 4 and .app target. Anyway, I have this directory structure:

(srcroot)/src/*.c, src/*.h
(srcroot)/xcode/appname/appname.xcodeproj

If I use Xcode to create a new C or H file, the save dialog will always show me the xcode/appname/ path, so I have to move up until I get to src, and then I save the new file there. But it will appear red on the project navigator, and "get info" will show the wrong absolute path (usually a missing path component before src/whatever.c). If I change the path from "get info" to the correct one, it will work.

If I alternatively create the file in src/ externally and add it to Xcode, its path will be correctly detected on the navigator, but when I try to compile, it will say something like "(srcroot)/xcode/appname/src/whatever.c not found!", despite src/ being on (srcroot), not xcode/appname.

I'm working on a Git repository, that was cloned with another application (SourceTree), not Xcode.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.