jnpdx
jnpdx

Reputation: 52535

XCode import statement and subdirectories

I'm running into an import issue that as a relative newcomer to the Objective-C/C++/XCode world I haven't seen before.

I'd like to include this library with my project: https://github.com/jdkoftinoff/jdksmidi

But, it seems like no matter how I try to add it to the project, I get errors when I try to import: #import "jdksmidi/world.h" (No such file or directory)

I can import without the jdksmidi subdirectory, but since inside all of the headers included with the library, the author uses the same syntax with the subdirectory, I'm stuck.

Simplified question: how do I add the library to my project so that I can use the #import "jdksmidi/___FILE____.h" format and not throw compiler errors?

Thanks

Upvotes: 2

Views: 2472

Answers (2)

iFreeman
iFreeman

Reputation: 873

you need add your jdksmidi/world.h file in project, just drag'n'drop it into your groups & files section. Or you can use #include directive

Upvotes: -3

Richard Brightwell
Richard Brightwell

Reputation: 3012

You probably need to adjust your User Header Search Paths (USER_HEADER_SEARCH_PATHS) in your build settings. Make sure that the folder containing jdksmidi is in the path. Hope that helps.

Upvotes: 4

Related Questions