Xcode cannot find my static library!

Here is the linker error:

i686-apple-darwin10-gcc-4.2.1: /Users/william/Documents/SettingsLibrary/build/Debug-iphonesimulator/libSettingsLibrary.a: there is no such file or directory Command /Developer/Platforms/iPhoneSimulator.platform/Developer/usr bin / gcc-4.2 failed with exit code 1

A few strange things that may be the key to what's happening:

1) In my "library search paths" I included a recursive path to the library project:
.. / SettingsLibrary / **

However, SettingsLibrary builds itself in SettingsLibrary / build / Debug / iphoneos / libSettingsLibrary.a
Meanwhile, based on the error message, the linker seems to be looking for: SettingsLibrary / assemblies / Debug-iphonesimulator / libSettingsLibrary.a

2) I included the library project in my main project. When I right-click on groups and files, there is an option to include the libSettingsLibrary.a file in my target or not. In at least one other project using the library that I looked at, this flag does not exist for the .a file.

+3
source share
1 answer

It’s hard to say what the problem is with your project. You can check the following in the Groups and Files view of the main project:

  • Is the static library project (SettingsLibrary.xcodeproj) presented under the node under your application (the very first node)?
  • Does the library file (libSettingsLibrary.a) appear a little lower?
  • (SettingsLibrary ( SettingsLibrary.xcodeproj) node ( Targets/YourApp)?
  • (libSettingsLibrary.a) node Link Binary With Libraries ( )?

, ?

, . , (SettingsLibrary/build/Debug/iphoneos/libSettingsLibrary.a ).

( ): , .

+3

Source: https://habr.com/ru/post/1782098/


All Articles