Re: Including C/C++ headers
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