[postgis-devel] Still no luck getting shp2pgsql-gui to compile under MinGW

Mark Cave-Ayland mark.cave-ayland at siriusit.co.uk
Mon Jul 13 02:15:41 PDT 2009


Paragon Corporation wrote:

> We get different results from this clean box than my prior attempts, but
> still fails at trying to build the gui.
> 
> Attached is the build log just trying to build the loader.
> 
> Output of our pkg-config --cflags gtk+-2.0 looks like the below
> 
> -mms-bitfields -Ic:/MinGW/include/gtk-2.0 -Ic:/MinGW/lib/gtk-2.0/include
> -Ic:/MinGW/include/atk-1.0 -Ic:/MinGW/include/cairo
> -Ic:/MinGW/include/pango-1.0 -Ic:/MinGW/include/glib-2.0
> -Ic:/MinGW/lib/glib-2.0/include -Ic:/MinGW/include/libpng12
> 
> 
> We had originally tried to install under c:/gtk/opt  and can't remember the
> exact errors we got with that.  They might have been the same.
> 
> Anyrate maybe someone has some clues.  I think on my corrupted box, I was
> able to get further.  The shp2pgsql-gui.o was being produced and was
> breaking at building the exe.  But then I was fiddling around with the
> makefile so much that one of my fiddles might have made it get that far.

Ooooh - this looks much better to me. Looking at your output here:

shp2pgsql-gui.c
shp2pgsql-gui.c: In function `pgui_log_va':
shp2pgsql-gui.c:82: warning: implicit declaration of function `vasprintf'
shp2pgsql-gui.c: In function `pgui_read_connection':
shp2pgsql-gui.c:307: warning: implicit declaration of function `asprintf'
shp2pgsql-gui.c: In function `pgui_action_import':
shp2pgsql-gui.c:436: error: `encoding' undeclared (first use in this 
function)
shp2pgsql-gui.c:436: error: (Each undeclared identifier is reported only 
once
shp2pgsql-gui.c:436: error: for each function it appears in.)
make: *** [shp2pgsql-gui.o] Error 1

It looks like the shp2pgsql GUI code doesn't use the correct lw_ prefix 
GNU functions, and the pgis_ prefix with getopt() :(  Can you try the 
attached patch, and also Paul can you make sure I didn't break anything 
on your Mac?

Incidentally I also noticed that the shp2pgsql-core.h file doesn't have 
the standard copyright header included on it. Paul, any chance you can 
add this?


ATB,

Mark.

-- 
Mark Cave-Ayland - Senior Technical Architect
PostgreSQL - PostGIS
Sirius Corporation plc - control through freedom
http://www.siriusit.co.uk
t: +44 870 608 0063
-------------- next part --------------
A non-text attachment was scrubbed...
Name: postgis-loader.patch
Type: text/x-diff
Size: 4654 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/postgis-devel/attachments/20090713/3e374357/attachment.patch>


More information about the postgis-devel mailing list