No library found for -llib. (clang: error: linker command failed with exit code 1 (use -v to see the call))

I am working on a project that was previously made and uploaded to the app store. When I run this app in Xcode 5.0 it works fine, but when I run it in Xcode Version 5.1.1 (5B1008) I get linker error on both devices and simulator.

Error Message- Library not found for -llib. (clang: error: linker command failed with exit code 1 (use -v to see the call)) .

I searched a lot but didn't get any Library not found for -llib

about the Library not found for -llib

error Library not found for -llib

. Is there something I need to change in build settings to fix this problem?

+3


source to share


3 answers


Detailed description of the linker command line for the -L

parameters used :

enter image description here

Then use Terminal or Finder to find out if your file exists libXXX.a

in those directories. If the library exists elsewhere, you need to configure the search paths in the library:



enter image description here

However, there are a few details that you did not provide in your question when using the library in your application:

  • Is the library built as part of an Xcode project / workspace (like in the first image)?
  • Is the library provided by a third party version with binary ( .a

    ) and header files (like in the second image)?
+6


source


TL; DR: I ran make

in the wrong directory, so the paths were messed up.

Problem:

>make
linking ../build/release/yubikey-personalization-gui
/usr/x86_64-suse-linux/bin/ld: cannot find -llib
...

      

I ran into this while compiling the Yubikey personalization tool. I tracked the call -llib

in mine Makefile

which looked like this:



...
LINK = @echo linking $@ && g++
...
LIBS = $(SUBLIBS)  -L/usr/lib64 -L../lib/release -llib -lyubikey -lykpers-1 -lQtGui -L/usr/lib64 -L/usr/X11R6/lib -lQtCore -lpthread 
...
$(LINK) $(LFLAGS) -o $(TARGET) $(OBJECTS) $(OBJCOMP) $(LIBS)

      

So it set up a variable named LINK

which would print "linking" and then call g++

which is the compiler. He then sets up -llib

LIBS

which will contain ominous -llib

. Then it composes and runs the command $(LINK)... $(LIBS)

. Which launches g++

with a parameter -llib

.

And what does it do? It turns out that it -l<something>

tells the compiler to use the " something

-l" library . So it asks for a library named lib

. Which is strange in common. I realized that the sources come with a directory lib/

located at ../lib

.

So starting make

from the directory above fixed it.

0


source


You have to remove libstdc ++ from other linker flags in your xcode project

fooobar.com/questions/16144863 / ...

0


source







All Articles