Reputation: 41
I'm trying to use the png++ library. Already added it to the library search path in eclipse (windows user, if relevant), but I get the
fatal error: png++/png.hpp: No such file or directory
I really don't know what to do. Thank you!
Upvotes: 3
Views: 4709
Reputation: 41
After days, tears and blood, my professor (PhD Daniel Brake) figured it out! Here is what we did to make it work. I hope you never need to use this library on a Windows machine (conf: Windows 10, MinGW, Eclipse):
C:\MinGW\msys\1.0\msys.bat
mingw-get install libz-dev
cd /path/to/libpng/folder
./configure -prefix=/mingw
make
make install
cd /path/to/png++/folder
tar -zxf png++-0.2.x.tar.gz -C
#include <sstream>
to the includeslook for the part and comment it:
strerror_r(errnum, buf, ERRBUF_SIZE);
return std::string(buf);
std::stringstream ss;
ss << errnum;
return ss.str();
png.h
, in my case it's in "C:\MinGW\msys\1.0\mingw\include"#include <png.hpp>
(not #include <png++/png.hpp>
)Upvotes: 1
Reputation: 1015
Okay. You need to check your settings one by one.
I'm not much of a user of Eclipse CDT but that's how it works. If you are trying to do image manipulation without prior C++ experience, I suggest you to go with python/Java, they are easy to use.
Upvotes: 1