Xcode project for Mac OS X?

9 views
Skip to first unread message

Iceberg-dev

unread,
Sep 28, 2008, 8:40:59 AM9/28/08
to xar-devel
Hi,

is there already a Xcode project to build the xar lib on Mac OS X? I
haven't found one in the xar source archive.

The interest I see in this is that with the current make/config files,
you just get the native version (PPC or i386) of the library and
apparently Xcode does not think it's a static library either.


Rob Braun

unread,
Sep 28, 2008, 1:20:02 PM9/28/08
to xar-...@googlegroups.com

On Sep 28, 2008, at 5:40 AM, Iceberg-dev wrote:

>
> Hi,
>
> is there already a Xcode project to build the xar lib on Mac OS X? I
> haven't found one in the xar source archive.

There is a wrapper around the xar library here, but I haven't touched
it in a long time: http://code.google.com/p/xar/source/browse/#svn/
trunk/XarKit
It was contributed to the project by another developer.

> The interest I see in this is that with the current make/config files,
> you just get the native version (PPC or i386) of the library and
> apparently Xcode does not think it's a static library either.

libxar can be built fat with:
CFLAGS="-arch i386 -arch ppc" LDFLAGS="-arch i386 -arch ppc" ./configure
This also produces a static archive of lib/libxar.a

Rob

Iceberg-dev

unread,
Oct 4, 2008, 4:19:17 PM10/4/08
to xar-devel
Hi,

thanks for the answer.

Unfortunately, this won't work on systems earlier than Mac OS X 10.5
(I'm using 10.4.11). Because the gcc check code assumes that
libSystem.dylib is a FAT binary inside /usr/lib. As a matter of fact,
the FAT version is available in the appropriate SDK.

Rob Braun

unread,
Oct 4, 2008, 5:00:10 PM10/4/08
to xar-...@googlegroups.com
On Sat, Oct 04, 2008 at 01:19:17PM -0700, Iceberg-dev wrote:
>
> Unfortunately, this won't work on systems earlier than Mac OS X 10.5
> (I'm using 10.4.11). Because the gcc check code assumes that
> libSystem.dylib is a FAT binary inside /usr/lib. As a matter of fact,
> the FAT version is available in the appropriate SDK.

I understand your pain, and it is cumbersome to use the various SDKs
by hand and an XCode project sould be preferable. However, here is
an document detailing how to use the SDK and compile for multiple
architectures for 10.4:
http://developer.apple.com/documentation/Porting/Conceptual/PortingUnix/compiling/chapter_4_section_3.html

Rob

Iceberg-dev

unread,
Oct 18, 2008, 10:48:54 AM10/18/08
to xar-devel
> architectures for 10.4:http://developer.apple.com/documentation/Porting/Conceptual/PortingUn...

I found some time to work on this and this is actually not difficult
to create a static lib project:

1. You create a BSD Static Library Project named xar
2. You add all the files from the lib folder
3. You add the config.h and xar.h headers from the include folder
(This may require to run the config tool, I don't know).
4. You add /usr/include/libxml2 to the Header Search Paths
5. You build

Reply all
Reply to author
Forward
0 new messages