Re: Should I be building a static or dynamic library?
Re: Should I be building a static or dynamic library?
- Subject: Re: Should I be building a static or dynamic library?
- From: Stephen Kay <email@hidden>
- Date: Sun, 12 Aug 2012 17:33:07 -0400
- Thread-topic: Should I be building a static or dynamic library?
on 8/12/12 5:05 PM, Quincey Morris at email@hidden
wrote:
> It seems to me you're doing something unnecessary/unwanted by changing the
> File Type manually. In general, you would only want to change it yourself if
> your file had the "wrong" extension. In this case, your library has the
> correct ".a" extension, so you should be able to let the File Type get set
> automatically.
Because the "import" procedure (clearly imperfect) had set it to use '.lib'
as an extension, same as the old CodeWarrior libraries. This is why it ended
up being included in the parent target's build phases as a resource, and not
a library (I guess) - because it was not recognized as a library by Xcode.
So I did need to manually set the "Executable Extension" to something else,
i.e. 'a', in the library Target's Build > Packaging: "Executable Extension".
> FWIW, though I don't have an Xcode 2.x project handy to look at, in Xcode 3.x
> the automatically-detected File Type shows as "archive.ar <http://archive.ar>
> " for a simple libXXX.a library added to the project. The manual choice of
> "archive" may have been the only thing that was wrong.
You're right; this was the problem. I set it to archive.ar, and now I can
link in the static library (well, except for some undefined symbols I have
to fix). Thanks for that!
So I guess to answer my own question (I'm not that knowledgeable on the
differences between library types), but from some more reading:
If this proprietary library is only to be used by the instance of my
application, and not shared with any other apps, then it should be a static
library?
Thanks,
- Stephen
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Stephen Kay
Karma-Lab :: developers of KARMA
http://www.karma-lab.com
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
_______________________________________________
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