views:

13

answers:

2

Is this legal? I'm getting an error "Can't find <lib>.framework/Versions/4/<lib>" from the linker. In this case, <lib> is 'QtGui' that has been built as an i386 framework (not universal), but another (third party) lib I'm linking to (that uses QtGui) is universal.

I'm thinking everything has to be built universal or not...

A: 

You can link a non-universal framework (say i386 only) with a universal framework (say with i386 and x86_64) to make an i386 binary.

Of course you can't make an x86_64 binary in this case.

Note that if your Mac has a 64 bit CPU, the linker defaults to mae an x86_64 binary. So the linker will complain if any of your library does not have the x86_64 part. If you want to create an i386 binary, you need to specify that explicitly on the command line.

Yuji
A: 

Roger.

Turns out my issue actually stems from bad embedded paths in the external libraries that have to be reset (which I didn't think would affect links, but it does).

The universal build issue was a suspected culprit, but no.

Thanks, rickb

rickb