[stderr] <string>:55: SyntaxWarning: "\." is an invalid escape sequence. Such sequences will not work in the future. Did you mean "\\."? A raw string is also an option. iio/iio.c:241:12: fatal error: png.h: No such file or directory 241 | # include <png.h> | ^~~~~~~ compilation terminated. error: command '/usr/bin/cc' failed with exit code 1
hint: This error likely indicates that you need to install a library that provides "png.h" for `iio@29` ```
How can I avoid above error thanks to existing `~/rpm/x86_64/usr/include/libpng12/png.h`?
Jun 5, 12:50pm
The error occurs because the compiler cannot find the png.h header file, which is required to build the iio package. You already have the header file at ~/rpm/x86_64/usr/include/libpng12/png.h, but the compiler is not looking in that directory.
Solution
You need to explicitly tell the compiler where to find the png.h header file by setting the CFLAGS environment variable to include the path to the directory containing png.h.
Steps:
Set the CFLAGS environment variable to include the path to the directory containing png.h: