Re: Not finding libraries
Re: Not finding libraries
- Subject: Re: Not finding libraries
- From: Jens Alfke <email@hidden>
- Date: Thu, 29 Dec 2016 10:04:54 -0800
On Dec 29, 2016, at 9:40 AM, Howard Moon < email@hidden> wrote:
Now, though, even though I can see that the linker statement includes the correct -L<path> for each of those paths, it fails to find my libraries.
Search paths are for _dynamic_ libraries. Static libraries are treated the same as compiled source files (“.o”) by the linker, i.e. they get included in the list of input files.
To include a static library in a target, all you should need to do is add the library to the project and make sure it’s included in the list of libraries in that target’s Build Phases.
I’ve sometimes seen a problem where Xcode thinks a “.a” file is a dynamic library, which causes the linker to ignore it. You can fix that by changing the file’s type to “Mach-O Object Code” in the file inspector in the right-hand pane.
—Jens |
_______________________________________________
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