Microsoft Dev Studio to XCode

Hasty
Unregistered
 
Post: #1
Hopefully my first post wont be too painful Wink

I've been slowly getting back into game & graphics programming and I wanted to give it a whirl on the Mac. The only thing holding me up is getting used to XCode... It's not so much as a road block as it is a change in thinking.

Typically I've organized my applications into a collection of static libraries. For instance I'd have distinct static library that drives my image processing, math utils, UI and so on. What I was used to doing was setting up each project individually in Developer Studio and compile a static lib. When it came time to creating an actually application using my static libs I would create my game project and add all my static lib projects to the solution. I would then set up the dependencies such that if I made any modifications to any of the code of the respective static libs that it would automatically compile that lib when I built my game project.

I'm wondering if it's possible to set this up in XCode as well. I've already ported my code where needed and created a BSD Static Library for each module of code, but is there a way to bring in the project like you can in developer studio so I can create build dependencies?

An even simpler question I have my libsnbmath.a file, built from my static library project. How do I link that in my carbon application in X code? I set up the Library Search Paths in my project settings, but I'm not sure where to specify the static lib files.

Thanks in advance. (=
Quote this message in a reply
Luminary
Posts: 5,143
Joined: 2002.04
Post: #2
I'm not sure you can set up inter-project dependencies. You can set up multiple targets within a project, though, and have them depend on one another. That might be your best bet.

To add a static library to your project, drag it in from the finder. Xcode will automatically add the search paths, too.
Quote this message in a reply
Hasty
Unregistered
 
Post: #3
Thanks Cook! Much appreciated.

Alrighty, thanks for the heads up on the project dependencies. Free is free, but it'd be nice (for me at least)... but I can work without it.

Hmm, I tried the drag & drop from the finder. I tried to drag testlib/build/Debug/libtestlib.a into my testapp xcode window and it didn't seem to do anything. =/
Quote this message in a reply
Hasty
Unregistered
 
Post: #4
Scratch that, I got it to work. I dragged it into the External Frameworks and Libriaries folder. The only question I have is there a way to have the Release profile point to a different one from the Debug profile?
Quote this message in a reply
Luminary
Posts: 5,143
Joined: 2002.04
Post: #5
If you want to do that, then rather than adding it using drag & drop, I'd put the path to the .a file into the "other linker flags" setting.
Quote this message in a reply
Moderator
Posts: 522
Joined: 2002.04
Post: #6
OneSadCookie Wrote:I'm not sure you can set up inter-project dependencies. You can set up multiple targets within a project, though, and have them depend on one another. That might be your best bet.
You can, actually.

http://rentzsch.com/cocoa/embeddedFrameworks

This video shows how near the end, where he makes MyApp depend on a separate MyFramework project.

-Jon
Quote this message in a reply
⌘-R in Chief
Posts: 1,260
Joined: 2002.05
Post: #7
OneSadCookie Wrote:I'm not sure you can set up inter-project dependencies. You can set up multiple targets within a project, though, and have them depend on one another. That might be your best bet.

To add a static library to your project, drag it in from the finder. Xcode will automatically add the search paths, too.

You can have project dependencies. Just drag the other project in.

Edit: Okay, Jon beat me to it... by three hours... Sneaky
Quote this message in a reply
Hasty
Unregistered
 
Post: #8
Thanks guys, much appreciated!!!
Quote this message in a reply
Hasty
Unregistered
 
Post: #9
Okay, sorry to be a pain... the only thing I am unsure of now is what my "Other Linker Flags" should be to link to my static lib.

I'm trying to specify separate libs for a release build and a debug build.
Quote this message in a reply
Luminary
Posts: 5,143
Joined: 2002.04
Post: #10
just put the path to the .a file. If it's a relative path, it's relative to the folder containing the .xcodeproj.
Quote this message in a reply
Hasty
Unregistered
 
Post: #11
Thanks again! I got it working now.
Quote this message in a reply
Post Reply 

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  New iPiSoft Markerless Motion Capture for Dual Microsoft Kinects. mrbones 0 3,207 Nov 22, 2011 02:57 PM
Last Post: mrbones