"ld: library not found for -lXYZ" means what? What are the different options?

What are the different possibilities when this error can occur? What things need to be looked for to get rid of this?

What if XYZ is a static library directly added to the project?

+6
source share
1 answer

This means that you are trying to establish a link to a library that was not found by the system. In your case, this is a simple static library. You should check the following:

  • Look for the appropriate item in red among your project files, with particular attention to the Frameworks group (which usually houses libraries). If you find it, correct the path or simply delete and re-add the library manually.
  • Repeat this in the Link Binary with Libraries entries on the Build Phases tab in the project / goal settings.
  • Go to the "Library Search Paths" tab on the "Build Settings" tab in the project / goal settings. Make sure the path to your libXYZ.a file is libXYZ.a .
+11
source

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


All Articles