• 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
Re: Including C/C++ headers
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Including C/C++ headers


  • Subject: Re: Including C/C++ headers
  • From: Jason Foreman <email@hidden>
  • Date: Wed, 6 May 2009 20:38:41 -0500

On May 6, 2009, at 5:58 PM, Andrew Wood wrote:

Im trying to use a C++ .a library and its associated headers in a Cocoa project.

2. I've worked out how to set the header search & library search paths by selecting the project in the left hand pane and going to 'Get info'.

If I change the include line from #include <mysql.h> to #include "mysql.h" it can find it. Evidently step 2 doesnt do what I thought it did- which is setup a -L flag to gcc?

Any ideas.

There are two header include paths: system headers and user headers. If you use `#include <foo.h>', then the system header path is searched for foo.h, and `#include "foo.h"' searches the user header path. You can examine the Build Results window (Build->Build Results, or cmd- shift-B) to see the command line that is used to invoke gcc, to see exactly what options are passed to it.


Which search path did you set up to find mysql.h? You might try the "Always Search User Paths" build option to look for system-style includes in the user header path.

Jason


Attachment: smime.p7s
Description: S/MIME cryptographic signature

 _______________________________________________
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: Including C/C++ headers
      • From: Andrew Wood <email@hidden>
References: 
 >Including C/C++ headers (From: Andrew Wood <email@hidden>)

  • Prev by Date: Re: Xcode-users Digest, Vol 6, Issue 231 Re: iPhone target-specific headers for Xcode
  • Next by Date: Switching from 10.4 SDK to 10.5 SDK Causes Shadow Declarations Error
  • Previous by thread: Including C/C++ headers
  • Next by thread: Re: Including C/C++ headers
  • Index(es):
    • Date
    • Thread