Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

problem using pngwriter with libpng 1.4

2011-01-02
2013-04-23
  • Hi everybody who might find this relevant

    This is a suggestion for what you could do if want to have PNGwriter working under opSuSE 11.3.

    I am pretty new to linux, but I am using openSuSE 11.3 and have just used about 4 hour getting PNGwriter to work.

    PNGwriter wouldn't work with libpng 1.4 devel (the libpng14-devel package), when I e.g. tried to compile the first example from the manual as described in the manual, I got an error saying:

    /usr/local/lib/libpngwriter.a(pngwriter.o): In function `pngwriter::readfromfile(char*)':
    /path-to-the-pngwriterdirectory/pngwriter-0.5.4/src/pngwriter.cc:1314: undefined reference to `png_set_gray_1_2_4_to_8'
    collect2: ld returned 1 exit status
    

    but when I removed the libpng14-devel (and the libpng14-compat-devel) package and instead installed the libpng12-devel package and the libpng12-compat-devel package it works.

    To get to this point however, I first had to set up a symbolic link in /usr/include/ to /usr/include/freetype2/freetype to get the compiler to stop complaining about freetype.

    I hope this will a help  to anybody who wants PNGwriter under openSuSE.

    And Poul, you might want to look into libpng 1.4 at some point (when you have some excess time)

    /regards
    Daniel