Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Monkaaay

macrumors 6502
Original poster
Jun 19, 2006
258
0
Richmond, VA
I'm told Subversion has a C interface by using it's header files. I'm looking for some direction in how I'd set this environment up in xcode. I have a Cocoa application I'm going to use. How would I go about making my Cocoa application aware of the Subversion header files so that I can call them in my project?
 

Eraserhead

macrumors G4
Nov 3, 2005
10,434
12,250
UK
You can just call the C code directly, Objective C fully supports C code (after all it is a superset of C).
 

Krevnik

macrumors 601
Sep 8, 2003
4,101
1,312
XCode normally likes seeing things in frameworks, but you can also link against paths.

In the compile/link settings for your project, you can add paths to the headers, and paths to the libs (you will need those as well). Be aware that doing it this way will make it so that the app will only /launch/ on machines with a compatible version of SVN installed, so it isn't ideal for distribution.

It isn't too horribly difficult to create your own SVN.framework bundle with the libs and headers there, and then link against that and copy it into your app bundle for something you intend to distribute. In fact, someone might have already done it.
 

Monkaaay

macrumors 6502
Original poster
Jun 19, 2006
258
0
Richmond, VA
Do they put out a release package with just the header and lib files? Or, do I need to compile it locally and use that?
 

Krevnik

macrumors 601
Sep 8, 2003
4,101
1,312
Do they put out a release package with just the header and lib files? Or, do I need to compile it locally and use that?

Not as far as I know, but you don't /need/ to compile it locally, either. A pkg install of SVN will place the libraries and headers into your system to compile against.

Producing a framework won't be easy as I first thought, as SVN has quite a few libraries.
 

garethlewis2

macrumors 6502
Dec 6, 2006
277
1
If you wait a while, say until the 26th October you will get Subversion as a Framework automatically. It is becoming the standard repository for source code system wide. So you could just add that into your project and call the code directly. Of course the downside is a Leopard only application.
 

Monkaaay

macrumors 6502
Original poster
Jun 19, 2006
258
0
Richmond, VA
Not as far as I know, but you don't /need/ to compile it locally, either. A pkg install of SVN will place the libraries and headers into your system to compile against.

Producing a framework won't be easy as I first thought, as SVN has quite a few libraries.

Any chance you know where these are in Tiger? I've been searching around and have only found the binaries.
 

Monkaaay

macrumors 6502
Original poster
Jun 19, 2006
258
0
Richmond, VA
If you wait a while, say until the 26th October you will get Subversion as a Framework automatically. It is becoming the standard repository for source code system wide. So you could just add that into your project and call the code directly. Of course the downside is a Leopard only application.

Sweeet. That would totally work for me. :)
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.