Seam Carving on the Mac - Nearly There

Update: Joachim Bengtsson figured out that the issue I was having wasn’t a linking issue per se – it was a bad mix between C and C++ on the original code. He’s since fixed it and made binaries available (I’ve gone and compiled my own, of course, and am tweaking the “GUI”:Wikipedia:GUI a bit to learn about Qt, which is always fun). So, who’s going to make a CoreImage component out of this?

While researching a bit more on Seam Carving, I came across Gabe Rudy’s GUI app, which happens to use Qt.

So I thought “what the hell, I’m on vacation” and picked up the Qt/Mac Open Source Edition, and after running qmake on the source tree fired up Xcode and started fiddling around.

First off, you need to change the C Language Dialect to C99 to get Andy Owen’s bit to compile at all. I’m told it has endianness issues, but I’m stuck a bit further upstream:

No matter what I do, I can’t get things to link with the Image object files – all the source files are there, the .o files get built, and yet persists in not linking to it. I can’t for the life of me figure out why (given that can be pretty obtuse about some things), but after invoking the damnably secret (and bordering on the baroquely obscure) compiler output pane, I have verified that does not link to it automatically:

There was, however, a quick way to get the “GUI”:Wikipedia:GUI to work: by enabling Zerolink (which lets you run your application inside and skip the link phase), I was able to run the whole thing except the resizing function (which, of course, barfs on the missing symbols):

Tantalizingly close.

So the question to my audience is: How do I get to link to a specific object file? I’ve tried creating a build target for the Image stuff as a library (to no avail) and rebuilding the whole project from scratch twice, so before I start waving dead chicken at it, I thought I’d put this out there for other people’s benefit (and maybe learn a thing or two about in the process).

This page is referenced in: