Can't properly include header files (C++, Xcode 3)

Discussion in 'Mac Programming' started by BrynnFlynn, Oct 31, 2011.

  1. BrynnFlynn, Oct 31, 2011
    Last edited: Oct 31, 2011

    BrynnFlynn macrumors member

    Joined:
    Aug 23, 2009
    #1
    Hi all,

    I am using frameworks from a company that has horrendous support (they're in Finland, I'm in the US) for their product; they don't explain their product at all, and it is mostly down to my ability to figure out how to troubleshoot the particular problem at the moment. Just in case someone wants me to just kick it back to them. :p

    My problem is this: I can't seem to properly import header files. For example, I want to use SimpleSDLApplication.hpp, contained within the framework MultiWidgets. The following implementations of the include statement do not work (meaning, they are not found):
    Code:
    #include <SimpleSDLApplication.hpp>
    #include "SimpleSDLApplication.hpp"
    #include "MultiWidgets/SimpleSDLApplication.hpp"
    #include <MultiWidgets/SimpleSDLApplication.hpp>
    The only permutation I have found to work is the following (with qualifications):
    Code:
    #include "MultiWidgets.framework/Headers/SimpleSDLApplication.hpp"
    However, this generates its own set of problems when it tries to read through the header SimpleSDLApplication.hpp, as all of the headers referenced there are using the #include <XYZ.hpp> format.

    The framework is installed in /Library/Frameworks/. I'm at a loss as to what's going on. I understand the answer is probably very simple, but I do appreciate any help I can get with this.

    EDIT: Forgot to mention that I have tried to include it all within my Xcode Project; I made a group and added MultiWidget.framework to that group.
     
  2. subsonix macrumors 68040

    Joined:
    Feb 2, 2008
    #2
    Since this is working;

    Code:
    #include "MultiWidgets.framework/Headers/SimpleSDLApplication.hpp"
    
    That seems to imply that MultiWidgets.framework is in your current directory and not /Library/Frameworks/. I might be missing something here though.
     
  3. BrynnFlynn thread starter macrumors member

    Joined:
    Aug 23, 2009
    #3
    See, that's the thing; I looked at the info for the framework...

    [​IMG]

    and it seems to be in the proper place.
     
  4. jiminaus macrumors 65816

    jiminaus

    Joined:
    Dec 16, 2010
    Location:
    Sydney
    #4
    Did you add the MultiWidgets.framework to your target? I can't remember how to do this in XCode 3, I've been using XCode 4 for far too long now.
     
  5. Mac_Max macrumors 6502

    Joined:
    Mar 8, 2004
    #5
    Long shot here but I've had similar issues on the Windows side when the project configuration got screwed up and for whatever reason (could have been something I did) the path to my DLLs (built in or otherwise) was blank.

    I haven't done anything in XCode besides some trivial Objective C & C++ stuff so I'm not too sure of the configuration details of XCode but it's worth a look.
     

Share This Page