Re: Not finding libraries
Re: Not finding libraries
- Subject: Re: Not finding libraries
- From: Alex Zavatone <email@hidden>
- Date: Thu, 29 Dec 2016 16:33:03 -0600
On Dec 29, 2016, at 12:45 PM, Howard Moon 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.
>>>
>>
>> Unfortunately, when I do that (which is actually what I did at first), it does not let me specify a different library for the Debug versus the Release build. I either select the Release or the Debug, and that is used for all configurations, as far as I can tell.
>>
Yeah, Apple's UI team really screwed us users by hiding important UI elements, because they made the little arrows HIDDEN which show that there are both Debug and Release configurations when want to edit a build setting. Just looking at the screen for Build Settings, it's COMPLETELY NOT OBVIOUS, that each build setting has more than one configuration unless you click on it and then Xcode will show you the arrow. You can expand the setting to see both Debug and Release, but you have to click on it first. Pressing the right arrow key on your keyboard will expand your selected build setting to show this.
>> (Also, doing that does put entries in the Library Search Paths settings, but breaks them apart into separate lines in the UI due to the spaces in the paths.)
>>
>
> On top of that, it still won’t build because of those spaces.
Put double quotes around your search paths.
> If I go into the settings and re-combine and quote those paths in the Library Search Paths, then it builds, this time. But if I close and re-open the project, it adds those escape characters to the quotes and spaces again, and then fails to build. Again. Every time I open, I have to remove those escape characters.
>
>> -Howard
>>
Hope this helps.
Alex Zavatone
_______________________________________________
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