[GRASS-dev] lib/pngdriver Mingw compile error

Paul Kelly paul-grass at stjohnspoint.co.uk
Wed Nov 1 07:13:35 EST 2006


On Tue, 31 Oct 2006, Glynn Clements wrote:

> Paul Kelly wrote:
>
>> Next problem is this one here:
>>
[...]
>> OBJ.i686-pc-mingw32/main.o(.text+0x188): In function `main':
>> c:/grass/grass6/display/drivers/PNG/main.c:43: undefined reference to `LIB_main'
>>
>> collect2: ld returned 1 exit status
>> make: *** [/c/grass/grass6/dist.i686-pc-mingw32/driver/PNG] Error 1
>> sh-2.04$
>>
>> LIB_main() should be defined in libgrass_driver, right?
>
> Right; lib/driver/main.c.
>
>> Bit lost on this
>
> Same here. As it's linking with -lgrass_driver, I have no idea why you
> are getting that error. Can you use nm or dlltool to check that the
> symbol is actually present in libgrass_driver.

It wasn't there! I think the problem is this bit in lib/driver/Makefile:
ifneq ($(HAVE_SOCKET),)
   LIB_OBJS += \
         main.o\
         command.o\
         connect_fifo.o\
         connect_sock.o
endif

$HAVE_SOCKET is empty because the configure script isn't detecting sockets 
properly. This page: http://www.mingw.org/MinGWiki/index.php/sockets 
appears to give some useful information on what needs done but I'm not 
sure if some or any of it has been done already in other parts of GRASS? 
E.g. how have some people got native Windows GRASS working and not come 
across this before?

Paul




More information about the grass-dev mailing list