Building Glib on Windows XP

I'm trying to configure GLIB on windows XP using a MINGW compiler.
I'm also using the MINGW command line MSYS.

While it is going through the process of configuring a Makefile (./configure), it won't find ZLIB.

I have ZLIB located at C:\zlib.
I have added an environmental variable ZLIB_LIBS = C:\zlib\lib , I have also tried ZLIB_LIBS = C://xlib//lib and also ZLIB_LIBS = c:/zlib/lib.

The GLIB configure file still can't see ZLIB and for the life of me I can't see why? I have tried to add the configure file for reference but it's too long so I have only added sections. Can anyone see why it can't see zlib? I can't make attachments so I can only past it below. I'm a bit limited by the lack of space available. The GLIB version is 2.42.0 and I am using a GLIB static library.


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
pkg_failed=no
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZLIB" >&5
$as_echo_n "checking for ZLIB... " >&6; }

if test -n "$ZLIB_CFLAGS"; then
    pkg_cv_ZLIB_CFLAGS="$ZLIB_CFLAGS"
 elif test -n "$PKG_CONFIG"; then
    if test -n "$PKG_CONFIG" && \
    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"zlib\""; } >&5
  ($PKG_CONFIG --exists --print-errors "zlib") 2>&5
  ac_status=$?
  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }; then
  pkg_cv_ZLIB_CFLAGS=`$PKG_CONFIG --cflags "zlib" 2>/dev/null`
		      test "x$?" != "x0" && pkg_failed=yes
else
  pkg_failed=yes
fi
 else
    pkg_failed=untried









Caveat: I don't use Windows.

Look in config.log to see the actual error.

If you see something like the following:
Package zlib was not found in the pkg-config search path.
Perhaps you should add the directory containing `zlib.pc'
to the PKG_CONFIG_PATH environment variable
No package 'zlib' found


At your command prompt try entering:export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/path/to/zlib.pc

HTH
Last edited on
Hi Thanks for that.. The Zlib issues are over now, but I have new ones.
I get this error which i believe is a MSYS problem according to this link.

http://mvclogic.com/qt/msys-mingw-homekeithstagedmingw32-problems/

I keep getting the error:
/home/keith/staged/mingw32/lib/libiconv.la


While the page does suggest a solution, when I go through it and search the MinGW directory I can't find the libiconv.la file. Furthermore there is no directory for this. I assume MSYS was build for open source machines and this is a residual matter which wasn't resolved.

Would anyone know how to get around this issue? If there is not directory I have created it in my MinGW folder though it could be in the wrong place. I have also downloaded libiconv and built it and taken the libiconv.la file and placed it in that directory.

it is now at; mingw/home/keith/staged/mingw32/lib/libiconv.la

Unfortunately it's done nothing to curb the problem. No change at all actually.

Any suggestions?
it is now at; mingw/home/keith/staged/mingw32/lib/libiconv.la

I think it should be in your "/mingw/lib" e.g.:
C:/mingw/lib/libiconv.la
I think it should be in your "/mingw/lib" e.g.:


Agreed, but the fact that MSYS is searching for it in:
mingw/home/keith/staged/mingw32/lib
is causing the problems.
Topic archived. No new replies allowed.