Using your own subdirectories with xcode

Discussion in 'Mac Programming' started by foidulus, Jun 23, 2010.

  1. foidulus macrumors 6502a

    Joined:
    Jan 15, 2007
    #1
    So I am trying, to no avail, to compile an existing project in XCode. The project uses directories to organize it's files, but xcode seemingly refuses to recognize them, I keep on getting compiler errors.

    For instance, the following line fails:


    #include <gfarm/gfarm.h>


    I have a file called gfarm.h in a directory called gfarm thats at the same level as the rest of the project, but it still complains. Any ideas on how I can fix this?

    I have a real love-hate relationship with XCode, the things it does well it does extremely well, but the things it doesn't do well it really REALLY stinks at....
     
  2. chown33 macrumors 604

    Joined:
    Aug 9, 2009
    #2
    This means "search system includes":
    Code:
    #include <gfarm/gfarm.h>
    
    This means "search user includes":
    Code:
    #include "gfarm/gfarm.h"
    
    Unless you have the build option turned on to always search user includes.

    AFAIK, the above is the normal standardized behavior for C #include.
     
  3. PatrickCocoa macrumors 6502a

    Joined:
    Dec 2, 2008
    #3
    Also, "to organize it's files" should be "to organize its files". I mention this only because you seem to be annoyed that the computer wants its syntax exactly correct. You may (or may not) want to start practicing correct syntax when using English as a way of training yourself to use correct syntax when programing.

    I will refrain from mentioning your use of the words "xcode" and "XCode", neither of which are correct.
     
  4. foidulus thread starter macrumors 6502a

    Joined:
    Jan 15, 2007
    #4
    I'll probably get the modhammer brought down on me but that was the type of fanboy response that makes dealing with Apple people so insanely annoying. I speak 3 natural languages, have a masters in computer science and have written professional programs in at LEAST 10 different programming languages. I know what correct syntax is, you just seem to be upset that I didn't glorify everything that Apple puts out. I have used other IDEs(happy? I used correct capitalization) and I find Xcode to be the most annoying by far. If I wasn't required to use it I wouldn't. Your snide fanboyish remarks aren't productive, and please don't act like you have never made a typo before.
     
  5. foidulus thread starter macrumors 6502a

    Joined:
    Jan 15, 2007
    #5
    Yeah, I figured that out, thanks. What's annoying in Xcode is that if you import source you actually have to tell it to preserve the structure, the default is to import everything into the same directory. Furthermore there is no way to actually create a real folder in the GUI, you have to go through terminal to do that.
     
  6. chown33 macrumors 604

    Joined:
    Aug 9, 2009
    #6
    No, that's the difference between a Group and a Folder Reference. Groups appear as yellow, folder references as blue.

    Or perhaps you mean the making of copies on import, which isn't always necessary (I almost never use it). I usually just copy or move a folder into a project's src dir, then drop it onto Xcode's project window, Groups & Files column.

    Hard to be more specific without knowing more details of exactly what you did, what you expected, and what actually happened.


    Or Finder.

    Or anything else that creates a folder. Such as one of the scripts you can write and put under Xcode's script menu.

    The reason for this is that Xcode generally doesn't care about folder structure. A few things do need a folder structure (e.g. Help Books). For these, Xcode knows what to do, unless you tell it otherwise.


    I get the feeling you don't know Xcode that well, and are assuming it works the same way that other tools work, with which you have more experience. This will be a haphazard strategy, at best.

    http://developer.apple.com/mac/libr...eWorkspace/000-Introduction/Introduction.html

    There are other Xcode guides that would be worth reading.
    Suggested google search terms:
    xcode guide site:developer.apple.com
     
  7. GotFocus macrumors newbie

    Joined:
    Apr 29, 2011
    #7
    He did, he can't spell programming
     
  8. jiminaus macrumors 65816

    jiminaus

    Joined:
    Dec 16, 2010
    Location:
    Sydney
    #8
    Really? You necro a thread for this!?
     

Share This Page