Complete.Org: Mailing Lists: Archives: freeciv-dev: November 2003:
[Freeciv-Dev] building libpng on MinGW?
Home

[Freeciv-Dev] building libpng on MinGW?

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: <freeciv-dev@xxxxxxxxxxx>
Subject: [Freeciv-Dev] building libpng on MinGW?
From: "Brandon J. Van Every" <vanevery@xxxxxxxxxxxxxxxxxxx>
Date: Sat, 1 Nov 2003 19:06:10 -0800

Brandon J. Van Every wrote:
> From: Andreas Kemnade
> > Brandon J. Van Every writes:
> >  >
> >  > I have:
> >  > /mingw/include/_mingw.h
> >  > /mingw/include/windows.h
> >  > /usr/include/png.h
> >  > /usr/include/zlib.h
> >  >
> > Then move /usr/include/png.h and /usr/include/zlib.h to
> > /mingw/include
> > Something similar has to be done for the libs.
> >
> I understand that your suggestions may solve the problem.
> But it is not The Right Way to solve the problem.

Trying to figure out The Right Way on MinGW made me tear out more hair.
I tried your way.  It wasn't entirely easy: zlib has a configure script
that will take --prefix=/mingw, but libpng requires manual makefile
tweaking.  And unfortunately, your way doesn't work either.  :-(  Still
at the same error:

checking png.h usability... no
checking png.h presence... yes
configure: WARNING: png.h: present but cannot be compiled
configure: WARNING: png.h: check for missing prerequisite headers?
configure: WARNING: png.h: proceeding with the preprocessor's result
configure: WARNING:     ## ------------------------------------ ##
configure: WARNING:     ## Report this to bug-autoconf@xxxxxxx. ##
configure: WARNING:     ## ------------------------------------ ##
checking for png.h... yes
checking for png_read_image in -lpng... no
configure: error: "You have to install libpng"

I'm thinking at this point, I'm finding it ok, but I'm not building it
properly?  I used:

libpng 1.2.5
makefile.cygwin
prefix=/usr/local
CC=gcc -mno-cygwin
MINGW=1
MINGW_CCFLAGS=-I/mingw/include
MINGW_LDFLAGS=-L/mingw/lib
ZLIBINC=/usr/local/include
ZLIBLIB=/usr/local/lib

I can build libpng and install it fine, but when I "make test-installed"
I get:

vanevery@VANGOGH ~/libpng-1.2.5
$ make test-installed
gcc -mno-cygwin -I/mingw/include -I/usr/local/include -Wall -O3 -funroll
-loops -fomit-frame-pointer  \
   `/usr/local/bin/libpng12-config --cflags` pngtest.c \
   -L/usr/local/lib \
   -o pngtesti.exe `/usr/local/bin/libpng12-config --ldflags`
C:/DOCUME~1/vanevery/LOCALS~1/Temp/cc69aaaa.o(.text+0x20be):pngtest.c:
undefined reference to `png_libpng_ver'
C:/DOCUME~1/vanevery/LOCALS~1/Temp/cc69aaaa.o(.text+0x2809):pngtest.c:
undefined reference to `png_libpng_ver'
make: *** [test-installed] Error 1


Cheers,                     www.indiegamedesign.com
Brandon Van Every           Seattle, WA

Taking risk where others will not.



[Prev in Thread] Current Thread [Next in Thread]