开发者

XCode won't generate lib, framework or app bundle; partial success with xcodebuild command

This has been driving me nuts for a couple days now. I have been poking around on Google for hours with no luck. I have glimpsed a few tantalizingly close hits here (see link at bottom), but nothing really speaks to my situation.

First, some context. I use a program called Assignment Tracker X on OS X for organizing my school assignments. It's pretty good for what it does, but a lot of features are missing, incomplete, or just plain broken. The project is abandonware, with the last update coming over two years ago. Luckily, it's GPL and I have the source. I decided I wanted to fork my own version and put in a slew of fixes and features I've been wanting, but I can't get it to build correctly through XCode.

The Problem

When I go to build, it cranks through everything开发者_Go百科, no problem. Files are copied, objects and compiled, and the app bundle is touched. Build succeeded with no errors. Or even warnings. But the executable itself is never linked or copied, so trying to execute it of course fails.

Attempts at Resolution

Importantly, it builds correctly for MacPorts. I debugged their build script and found that the secret was a commandline build:

xcodebuild  -alltargets -configuration Deployment build OBJROOT=build/ SYMROOT=build/ MACOSX_DEPLOYMENT_TARGET=10.6 ARCHS="i386" SDKROOT="" GCC_VERSION=4.2

This command successfully builds the project, including linking an executable and building it into a valid app bundle. The weird part is that all of those options match the project and target settings; they're not overriding or adding anything new to my version of the project as far as I can tell.

I thought part of the problem was the old version of RBSplitView it was using, so I downloaded the source for that, and when I build it does the same thing in a completely separate project: compiles all the source files, copies resources, touches bundles, and then it's done. It doesn't link anything. It doesn't even run libtool to build the library archive. I was able to get the library, framework, and IB plugin building correctly with the following similar command:

xcodebuild  -target '[TARGET NAME HERE]' -configuration Debug build OBJROOT=build/ SYMROOT=build/ MACOSX_DEPLOYMENT_TARGET=10.6 ARCHS="i386 x86_64" SDKROOT=""

This is encouraging, but even the commandline build won't build RBSplitView's included test app. Every which way I try it, I am cheerfully informed there were no errors, and that building has completed successfully, but of course it hasn't.

I even completely removed XCode, and reinstalled it from a fresh download. An hour and a half later, nothing's changed.

Other Information

My issue is a lot like the one Stephen Furlani had, but note that his solution isn't applicable; RBSplitView only depends/links with Cocoa.framework, and it rightly resolves the path to /System/Library/Frameworks, and the app target correctly references the local lib I was able to build.

In case it's relevant: OS X 10.6.7, XCode 3.2.6

What else do you need? Ask, and ye shall receive further details.

Thanks everyone.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜