Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Adding dependent project in XCode 4

I am trying to add a dependent project in XCode 4. The link to the project is this: https://github.com/jverkoey/ObjQREncoder

The author described a way to add this but it's for XCode 3. I am trying to add it to XCode 4. I dragged the project inmy frameworks, then went to Targets and QREncoder in Target Dependencies. Then I added libQREncoder.a in "Link Binary with Libraries". Then I added this for header search path "src/Classes".

When I include "QREncoder/QREncoder.h", it gives me this error: file://somePath/FINALQRAppDelegate.m: error: Lexical or Preprocessor Issue: 'QREncoder/QREncoder.h' file not found

This is how my project is set up: enter image description here

FINALQR is my project to which I am trying to add the dependency and the dependency project is in src.

Thanks.

The problem is it doesn't recognize the QREncoder class.

like image 644
user635064 Avatar asked May 27 '11 23:05

user635064


1 Answers

Only Xcode 4 workspaces benefit from shared build folders across multiple projects. From the main menu, select File > New > New Workspace... Save the workspace, then drag your subprojects into its Project navigator panel.

Be careful where you place them (make sure you're not making one project a subproject of another within the workspace) so that they're all top-level projects within your workspace. This will cause them to share the build folder and automatic dependency detection should work.

Unless, of course, you have custom search paths set in your targets' build settings. :-)

like image 199
Joshua Nozzi Avatar answered Oct 14 '22 04:10

Joshua Nozzi