Complex XCode projects

Member
Posts: 30
Joined: 2006.04
Post: #1
I currently have my code set up to build as multiple projects for example:-

<RTRacing>
--<RTCore>
----RTCore.xcodeproj (common dynamic library in C++)
--<CoreTest>
----CoreTest.xcodeproj (simple Cocoa app in Obj-C++ which links with RTCore.dylib)
--<...> (other related projects)

What I'm wanting to do is to have one project file at the RTRacing level with which encompasses the other projects.

I tried importing the sub projects into my root level project but it doesn't seem to behave the way I want it to (The way Visual Studio's Solutions can contain multiple projects).

Reading the XCode Documentation, it suggest I can have a project set up, which builds multiple targets, so I have been persuing this approach. I setup an empty project in XCode, and created two targets RTCore and CoreTest. RTCore builds fine, but when building CoreTest I'm getting thousands of what look like Objective-C errors precompiling AppKit.h e.g.

error: expected unqualified-id before '@' token
error: expected constructor, destructor, or type conversion before '*' token
error: 'NSString' was not declared in this scope

The Target looks to be setup as it is in the stand alone project, and all source files are exactly the same as the stand alone version (.cpp & .mm), but I must have missed something. Can anybody help?

Many Thanks

Claire
Quote this message in a reply
Luminary
Posts: 5,131
Joined: 2002.04
Post: #2
Quote this message in a reply
Member
Posts: 30
Joined: 2006.04
Post: #3
It certainly did end up being relevent. I'm not actually using the .pch files (they are essentially empty) but it seems that GCC_PREFIX_HEADER is getting set to $(SYSTEM_LIBRARY_DIR)/Frameworks/AppKit.framework/Headers/AppKit.h when I add new Cocoa Application Targets to my project. I'm not really sure why this is happening or if this is correct behaviour.

Regardless I changed the prefix header to point to CoreTest/CoreTest_Prefix.pch
and it builds fine.

Thanks for the tip Smile
Quote this message in a reply
Post Reply 

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  Using Subversion 1.5 with Xcode 3 to manage libraries over multiple projects Sea Manky 5 3,733 Jun 29, 2008 12:55 PM
Last Post: OneSadCookie
  Problem Updating Old Xcode Projects dancedrummer 7 4,008 Apr 13, 2006 10:20 AM
Last Post: dancedrummer