Sign in to follow this  

XCode Woes

Recommended Posts

I currently have a nice framework implemented in visual studio. One solution containing 1 executable project, and 10+ static libraries projects. This is a nice setup, and accomplishes my goals.

Now i am trying to port this over to XCode. and this is where my troubles start.

I am very new to XCode and Mac in general. So please bare with me. What i am trying to do is the simplest of projects, like "HelloWorld 2" lol.

What i want to do is create a workspace that has one project as a static library, and one project that implements that static library. If i can get this simple process down, then i think the rest will fall into place. However, i haven't found any solid tutorials on it. I have found 100+ examples, each doing it differently, and i guess i am looking for best practices here. Also, i have read a ton of places that there is a bug/issue when updating a static library that the target application doesn't update the library reference properly.

If anyone has any suggestions, or a good site for what i am looking for, and i mean step by step hold my hand on this one, at least for now.

Thanks much

Share this post

Link to post
Share on other sites
We do it something like this:

1. set up the static lib project, then close it.
2. set up the executable project
3. drag static lib .xcodeproj into the executable project
4. Open "build phases" for the executable project and add the target from the lib project to "target dependencies"
5. Also add the mylibrary.a-file to "Link binary with libraries"

This way, you have one "workspace", through which you can develop both the executable and the library.

One problem is that you can't have more then one project open at a time that references the same library .xcodeproj, but I find that manageable.

Share this post

Link to post
Share on other sites
So you have one parent project in the workspace, and then up the static lib projects setup as children of the parent project ?

i will give that a shot. i tried that before, but i had the static lib as a sibling and as a child of the parent project, and that wasn't reliable (100% of the time).

thanks much for your feedback

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this