├── filesystem
│ ├── wax_filesystem.h
│ └── wax_filesystem.m
├── json
│ ├── Rakefile
│ ├── wax_json.c
│ ├── wax_json.h
│
└── test
├── wax_test.h
└── wax_test.m
then drag the folder to xcode
but in main.m
i could only import header file like this:
#import<wax_text.h>
when using #import<wax/wax_test.h> ,report file not found error.
how can I use "wax/wax_test.h" like other entensions ?
Thx for your help!
When we're talking about #include, the difference between "" and <> is
that the former performs the search relative to where the .c file is
(and then also searches the paths you specified in "user header search
paths"). The bracket version (<>) searches relative to your system's
include directory (/usr/include on UNIXes, C:\Program
Files\MSVS\...\something\...\include on Windows) and then also
searches the paths specified in ("header search paths").
Here's a reference documentation on the subject from MS -->
http://msdn.microsoft.com/en-us/library/36k2cdd4(v=vs.80).aspx
The #import directive is almost the same as #include, but it may have
some dissimilarities like not actually looking in the right place when
you write #import "wax/your_header.h". The general rule of thumb is to
add directories with your own code as groups (not as folder
references) and always write #import "your_header.h".
Hope this helps.
--
Best regards,
Alexei Sholik
> but in main.m
> i could only import header file like this:
> #import<wax_text.h>
> when using #import<wax/wax_test.h> ,report file not found error.
I believe the 'wax' directory is added to the 'Header Search Paths'
and is searched recursively (this setting should have the value
'wax/*' or 'wax/**', I don't remember exactly). So you can import wax
files with #import <wax_text.h> because the 'wax' directory is
searched recursively, but #import <wax/wax_test.h> doesn't work
because the 'wax' directory itself does not contain that file, it is
located in one of the subdirectories.
> how can I use "wax/wax_test.h" like other entensions ?
I haven't looked at wax extensions close enough, so I'm afraid I can't
give you a relevant advice for this one. I suggest you take a look at
the directory structure for those extensions and project settings I
mentioned earlier and try to deduce how the compiler would find the
necessary files given your #import directive.