I need to work on png pictures for a school project using c++. I found png++ which seems pretty easy to use but I had some really hard time setting up everything to make it work (which it doesn't). I used Cygwin to properly install zlib and libpng. I properly included the png++ headers in my project (I'm using Eclipse). Here are some things that are not properly working:
If I try this line of code (as seen here ):
image img(1024,768);
I get this error after compiling on eclipse:
#error Byte-order could not be detected.
I read this answer here, but the solution is not working for me (I'm on windows 8 64 bit), and I get this other error (which is my main problem because Byte-order can be "brutally" fixed):
missing template arguments before 'img'
But even if I type a valid template argument (like < png::rgb_pixel> < png::rgba_pixel > < png::gray_pixel > < png::ga_pixel >) it says it's invalid.
I'm clearly not an expert on this and I wouldn't know what else to try. Any help would be much appreciated. If you need more info write a comment and I'll provide.