Question

I compiled a program.
Yesterday, this ran without errors. But today, a compilation error occurred.

Library not found for -lwebp

What is this? How do I fix it?

Was it helpful?

Solution

This is not a compilation error, it's a linker error.
It means, as one may guess, that the linker is looking for a library that your program references, and is unable to find it.
To fix it, you need to add some configuration to your project to tell the linker how to find the webp library, which your project references.

You can do that for instance by adding the path to the directory containing libwebp.a to the "Library Search Paths" section of your project or target configuration.

Another option is to add:

-L< replace this including the brackets with the same path as above>

in the "Other linker flags" section of your project or target configuration.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top