wcs2kml / cygwin64 / compile error /need Help

25 views
Skip to first unread message

Jean-Paul Godard

unread,
Sep 20, 2014, 6:35:57 AM9/20/14
to astro...@googlegroups.com
Hi all,

I'm trying to compile Wcs2kml with gflags 1.5 on a cygwin64 environment ...

remains following errors (after some update for deprecated statements )
Any Hint?


make[4]: Entering directory '/opt/wcs2kml/src/google'

/bin/sh ../../libtool --tag=CXX --mode=compile g++ -DHAVE_CONFIG_H -I. -I../../src -I../../src -I../../src/google -I../../src/google/libwcs -g -O2 -Wall -MT pngimage.lo -MD -MP -MF .deps/pngimage.Tpo -c -o pngimage.lo pngimage.cc

g++ -DHAVE_CONFIG_H -I. -I../../src -I../../src -I../../src/google -I../../src/google/libwcs -g -O2 -Wall -MT pngimage.lo -MD -MP -MF .deps/pngimage.Tpo -c pngimage.cc -DPIC -o .libs/pngimage.o

pngimage.cc: In member function 'bool google_sky::PngImage::Write(const string&) const':

pngimage.cc:544:13: error: invalid use of incomplete type 'png_info {aka struct png_info_def}'

info_ptr->width = width_;

^

In file included from ../../src/google/pngimage.h:22:0,

from pngimage.cc:19:

/usr/include/png.h:745:16: error: forward declaration of 'png_info {aka struct png_info_def}'

typedef struct png_info_def png_info;

^

pngimage.cc:545:13: error: invalid use of incomplete type 'png_info {aka struct png_info_def}'

[...]

Dustin Lang

unread,
Sep 20, 2014, 9:40:07 AM9/20/14
to astro...@googlegroups.com
I vaguely recall having problems with wcs2kml -- IIRC I had to get the svn / hg / whatever development version?

--dstn


Jean-Paul Godard

unread,
Sep 20, 2014, 4:16:18 PM9/20/14
to astro...@googlegroups.com

I made some modifications in :

pngimage.cc
stringprintf.cc

to fix the problems:
1 - As specified in libpng manual:
The png_info structure is designed to provide information about the PNG file. At one time, the fields of png_info were intended to be directly accessible to the user. However, this tended to cause problems with applications using dynamically loaded libraries, and as a result a set of interface functions for png_info (the png_get_*() and png_set_*() functions) was developed, and direct access to the png_info fields was deprecated..
2 - Adding #include <cstdio> to stringprintf.cc fixes problems.

Updated files  are attached for help.



pngimage.cc
stringprintf.cc
Reply all
Reply to author
Forward
0 new messages