Pregunta

Recibo un error después de colocar mi aplicación en AdMob.La aplicación estuvo funcionando hasta hoy.El error es el siguiente:

ld: library not found for -lGoogleAdMobAds
clang: error: linker command failed with exit code 1 (use -v to see invocation)

¿Cómo puedo arreglar esto?Gracias.

¿Fue útil?

Solución

A veces, simplemente elimina la referencia de la biblioteca y agregue una referencia nuevamente.

Aparte de agregar el SDK de los anuncios móviles de Google y otras bibliotecas nuevamente desde cero, le recomendaría que revise las rutas de búsqueda de la biblioteca .Hay instancias en las que copia o duplica un objetivo, Xcode decide que necesita escapar de cualquier cotización doble "con un '\'. Asegúrese de eliminar todos los \ 's, debe verse así:

ingrese la descripción de la imagen aquí

Pude duplicar el error, haciendo prefijarse mi camino con múltiples '\'.

Otros consejos

Tuve un problema similar de "biblioteca no encontrada".Sin embargo, fue porque accidentalmente estaba usando el .xcodeproj archivo en lugar del .xcworkspace archivo.

Seleccione su objetivo, vaya a "Build Phases" en "Link Binary With Libraries" eliminar ".a" archivo de esa biblioteca.Limpiar y construir.

Si error relacionado con COAPODS de la siguiente manera:

library not found for -lPod-...

Debe comprobar Otras banderas de enlazadores y elimínelo desde allí.

información adicional: si tiene un proyecto antiguo que usa COCOPODS.¡Y recientemente necesitaba agregar el use_frameworks! a tu podfile. COCOAPODS no agregará las bibliotecas a sus otras banderas de enlazadores Ya causa su heredación.Por lo tanto, es posible que necesite eliminar esos manualmente de las otras banderas de enlazadores que se agregaron antes Usando el uso_frameworks!

Para mi caso xcode 7 , también trabajó en xcode 9.1

ld: library not found for -ldAfnetworking
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Establecer Build Active architecture Only en Yes

 ingrese la descripción de la imagen aquí

Si el error es como seguir

ld: biblioteca no encontrada para -lpods

Descubrí que se creó un archivo "libpods.a" que está en color rojo (como archivos faltantes) de alguna manera en el grupo marco del proyecto.Simplemente simplemente quité ese archivo y todo se puso bien.

Editar: Otra solución

Otra solución que ya he respondido en la pregunta similar es en este enlace

Esto sucede si estás usando cocoapods y no usas el .xcworkspace archivo en lugar del predeterminado .xcodeproj archivo.

goto construir fases -> enlace binario con bibliotecas y eliminar la biblioteca que muestran errores porque esa biblioteca no está disponible en la carpeta del proyecto

Esto también puede suceder si abre el archivo de proyecto en lugar de un espacio de trabajo.He perdido como un día yo mismo de esta manera.

tarde para la respuesta, pero aquí están la lista de cosas que probé. Lo que estará en un solo lugar si alguien quiere intentar solucionar el problema.

  1. Arquitectura válida= ARMV7 ARMV7S
  2. solo construir arquitectura activa= no
  3. objetivo -> Configuración de construcción -> Otros banderas de enlazadores= $ (heredado)
  4. objetivo -> Configuración de construcción -> Ruta de búsqueda de la biblioteca= $ (heredada)
  5. Producto Limpieza
  6. la actualización de la vaina en la terminal

In my case there was a naming issue. My library was called ios-admob-mm-adapter.a, but Xcode expected, that the name should start with prefix lib. I've just renamed my lib to libios-admob-mm-adapter.a and fixed the issue.

I use Cocoapods, and it links libraries with Other linker flags option in build settings of my target. The flag looks like -l"ios-admob-mm-adapter"

Hope it helps someone else

Simply, GoogleAdMobAds.a is missing in project target. For me it was libAdIdAccessLibrary.a Please check attached screenshot

enter image description here

As for me this problem occurs because i installed Material Library for IOS. to solve this issue

1: Go to Build Settings of your target app.

2: Search for Other linker flags

3: Open the other linker flags and check for the library which is mention in the error.

4: remove that flag.

5: Clean and build.

I hope this fix your issue.

I know this is a bit old, but I just hit a similar issue and running 'pod update' fixed this for me. My library error was with AFNetworking...

Just be careful doing pod update if you don't use explicit versions in your pod file.

This error is very weird.

I had this error with -ldAfnetworking and I only copy my project in other path and works.

I tried renaming my build configuration Release to Production, but apparently cocoa pods doesn't like it. I renamed it again to Release, and everything builds just fine.

@raurora's answer pointed me in the right direction. I was including libraries in my "watchkitapp Extension/lib" path. In this case, the Library Search Path needed to be escaped with a '\', but the linker didn't seem to understand this. To fix / work-around the issue, I moved my lib path up one level so it was no longer in a directory that contained a space in the name.

I just update the pod file 'pod update' and it start to work for me normally.

Running 'pod update' in my project fixed my problem with the 'library not found for -lSTPopup' error.

Remarking Trevor Panhorst's answer:

"Just be careful doing pod update if you don't use explicit versions in your pod file."

Easy solution. Here's how I'd fix the issue:

  1. Go to the directory platforms/ios
  2. Then, execute the command pod install

That's it. This should install the missing library.

In the case of ld: library not found for -{LIBRARY_NAME} happened because the library file(s) is not existing.

Check the library path on your application targets’ “Build Phases” Library Search Paths tab.

The library file(s) path must be according to the real path for example if your file(s) in the root of the project you must set the path like $(PROJECT_DIR)

It is compile time error for a Static Library that is cased by Static Linker

ld: library not found for -l<Library_name>

You can get the error Library not found for when you have not include a library path to the Library Search Paths

ld means Static Linker which can not find a location of the library. As a developer you should help the linker and point the Library Search Paths

Build Settings -> Search Paths -> Library Search Paths 
Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top