Re: Linker refuses to link my dylib? Why?
Re: Linker refuses to link my dylib? Why?
- Subject: Re: Linker refuses to link my dylib? Why?
- From: Eric Albert <email@hidden>
- Date: Thu, 15 Feb 2007 11:12:55 -0800
On Feb 15, 2007, at 10:51 AM, Greg Guerin wrote:
Theodore H. Smith wrote:
I'm used to CodeWarrior you see which does
generate position dependant code, so I thoguht it wouldn't hurt?
Guess I was wrong. I hope this won't slow down my library???
This was mentioned earlier: premature optimization.
You think you have to enable all kinds of optimization settings
now, but you
don't. The first step is always to get it working. Then you
measure the
speed. Then, and only then, do you examine optimization options and
constraints.
Even if PIC does slow down your code, you may be forced to use it just
because it's a dylib. Or not, since I'm just guessing.
Mac OS X requires libraries to be relocatable, so you can't build
them with -mdynamic-no-pic. The errors Theodore posted about are
exactly what you'll see when you build a library with -mdynamic-no-
pic. Non-PIC code in a library would be very slightly faster, but
PIC code has the advantage of actually working....
-Eric
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden