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

Pedantic

macrumors newbie
Original poster
Apr 2, 2007
5
0
http://images.macrumors.com/vb/images/smilies/blackapple.gif Hi All:

This is an advanced question, I admit. I have a plugin that uses MySQL and I need to build a universal binary for it. The problem is that the library I link to for PowerPC is different from the library I link to for Intel Mac. It seems that when the actual link takes place, one or the other of the libraries is ignored.

How can I get both libraries noticed and paired up with the correct binary when I link the plugin?

TIA!
John
 

Eraserhead

macrumors G4
Nov 3, 2005
10,434
12,250
UK
obviously the simplest solution is to make an Intel Target and a PPC target linking to the respective libraries, but other than that I have no idea how you could do what you want, someone more knowledgeable may.
 

Krevnik

macrumors 601
Sep 8, 2003
4,101
1,312
obviously the simplest solution is to make an Intel Target and a PPC target linking to the respective libraries, but other than that I have no idea how you could do what you want, someone more knowledgeable may.

That is actually the right way to go.

After that, you need to use lipo (I think that is the name of the tool) to merge the two binaries into a Universal binary.

If you want to get fancy, you can create a third custom target (dependent on the other two) which runs a script to do the merge. That way you can just build this custom target and get a universal binary out the other end.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.