<div>I'm getting this error:</div><div><br></div><div>gcc -c -O2 -fPIC -Wall  -DNDEBUG    -DHAVE_VSNPRINTF -DNEED_STRLCPY -DNEED_STRLCAT -DNEED_STRRSTR     -DUSE_FASTCGI         -DUSE_LIBXML2    -DUSE_WFS_SVR -DUSE_WMS_SVR    -DUSE_GDAL -DUSE_OGR -DUSE_GEOS  -DUSE_THREAD -DUSE_PROJ    -DUSE_GD_GIF -DUSE_GD_PNG -DUSE_GD_JPEG -DUSE_GD_WBMP -DUSE_GD_FT -DGD_HAS_FTEX_XSHOW -DGD_HAS_GDIMAGEGIFPTR -DGD_HAS_GETBITMAPFONTS -DGD_HAS_GET_TRUE_COLOR_PIXEL -DUSE_ICONV -DUSE_GIF -DUSE_PNG -DUSE_ZLIB -DUSE_FREETYPE   -DDISABLE_CVSID -I/usr/include/freetype2  -I/data/installed/libpng/include   -I/usr/include -Irenderers/agg/include   -I/usr//include   -I/usr/include/gdal     -I/usr/include -I/data/installed/libiconv/include   -I/usr/include/libxml2   shp2img.c -o shp2img.o</div>
<div>g++ -O2 -fPIC -Wall  -DNDEBUG    -DHAVE_VSNPRINTF -DNEED_STRLCPY -DNEED_STRLCAT -DNEED_STRRSTR     -DUSE_FASTCGI         -DUSE_LIBXML2    -DUSE_WFS_SVR -DUSE_WMS_SVR    -DUSE_GDAL -DUSE_OGR -DUSE_GEOS  -DUSE_THREAD -DUSE_PROJ    -DUSE_GD_GIF -DUSE_GD_PNG -DUSE_GD_JPEG -DUSE_GD_WBMP -DUSE_GD_FT -DGD_HAS_FTEX_XSHOW -DGD_HAS_GDIMAGEGIFPTR -DGD_HAS_GETBITMAPFONTS -DGD_HAS_GET_TRUE_COLOR_PIXEL -DUSE_ICONV -DUSE_GIF -DUSE_PNG -DUSE_ZLIB -DUSE_FREETYPE   -DDISABLE_CVSID -I/usr/include/freetype2  -I/data/installed/libpng/include   -I/usr/include -Irenderers/agg/include   -I/usr//include   -I/usr/include/gdal     -I/usr/include -I/data/installed/libiconv/include   -I/usr/include/libxml2   shp2img.o  -L. -lmapserver -L/usr/lib/x86_64-linux-gnu -lfreetype -lz -L/usr/lib -lgd -ljpeg -L/usr/lib/x86_64-linux-gnu -lfreetype -lz -L/data/installed/libpng/lib -lpng -lz -lXpm -lX11     -L/usr//lib -lproj -ljpeg -L/data/installed/libpng/lib -lpng -lgif  -L/usr/lib -lgdal1.7.0     -L/usr/lib -lgeos_c -lpthread -L/data/installed/libiconv/lib -liconv -lfcgi   -lz -L/usr/lib/x86_64-linux-gnu -lxml2  -lm -lstdc++    -o shp2img</div>
<div>./libmapserver.a(mapimageio.o): In function `savePalettePNG':</div><div>mapimageio.c:(.text+0x8ef): undefined reference to `png_set_longjmp_fn'</div><div>./libmapserver.a(mapimageio.o): In function `saveAsPNG':</div>
<div>mapimageio.c:(.text+0x113e): undefined reference to `png_set_longjmp_fn'</div><div>./libmapserver.a(mapimageio.o): In function `readPNG':</div><div>mapimageio.c:(.text+0x1898): undefined reference to `png_set_longjmp_fn'</div>
<div>collect2: ld returned 1 exit status</div><div>make: *** [shp2img] Error 1</div><div><br></div><div>libpng 1.2.46</div><div>iconv (Ubuntu EGLIBC 2.15-0ubuntu10) 2.15</div><div><br></div><div>On Ubuntu 12.04 LTS with latest mapserver version.</div>
<div><br></div><div>This is what my configure looks like:</div><div><br></div><div>./configure \</div><div>        --prefix=/data/installed/mapserver \</div><div>        --with-threads \</div><div>        --with-fastcgi  \</div>
<div>        --with-freetype=/usr/bin/freetype-config   \</div><div>        --with-zlib \</div><div>        --with-libiconv=/data/installed/libiconv \</div><div>        --with-gd=/usr \</div><div>        --with-ogr \</div>
<div>        --with-geos=/usr/bin/geos-config \</div><div>        --with-gdal \</div><div>        --with-png=/data/installed/libpng \</div><div>        --with-proj=/usr/ \</div><div>        --with-curl-config=/usr/bin/curl-config \</div>
<div>        --with-wfs \</div><div><br></div><div>Thanks for any tips on how to make the build work.</div><div><br></div><div><br></div>