Re: Compiling gtk apps on MingW
- From: Ricardo Malafaia <rmalafaia gmail com>
- To: zhanglei <zhanglei sict ac cn>
- Cc: gtk-app-devel-list gnome org
- Subject: Re: Compiling gtk apps on MingW
- Date: Mon, 4 Jul 2005 10:42:49 -0300
holly crap, man! it worked!! just because of this tiny little detail!
well, just in case anyone is wondering, i also got sed to put all
paths from d:/ from into /d. just in case, you know...
anyway, here's the complete Makefile, in all its redundant glory,
that made it work, in case anyone is suffering from the same problem:
# Makefile
PREFIX=/mingw
GTKPATH=/d/GtkWin
GTKBIN=$(GTKPATH)/bin
GTKLIB=$(GTKPATH)/lib
GTKINC=$(GTKPATH)/include
PATH=$(GTKBIN):/usr/bin:/bin:/mingw/bin
CPPFLAGS=-O2 -g
PKG_CONFIG_PATH=$(GTKLIB)/pkgconfig
LD_LIBRARY_PATH=$(GTKLIB):$(GTKBIN):/lib:/usr/lib:/mingw/lib
CC=LD_LIBRARY_PATH=$(LD_LIBRARY_PATH); PATH=$(PATH); export
LD_LIBRARY_PATH PATH; gcc -mwindows -mms-bitfields
PKG=PKG_CONFIG_PATH=$(PKG_CONFIG_PATH); PATH=$(PATH); export
LD_LIBRARY_PATH PATH; pkg-config
GTK_CFLAGS=`$(PKG) --cflags gtk+-2.0 | sed -e 's/d:/\/d/g'`
GTK_LIBS=`$(PKG) --libs gtk+-2.0 | sed -e 's/d:/\/d/g'`
GTK=$(GTK_CFLAGS) $(GTK_LIBS)
all: exec/teste.exe
exec/teste.exe: teste.c
$(CC) teste.c -o exec/teste.exe $(GTK)
On 7/4/05, zhanglei <zhanglei sict ac cn> wrote:
Ricardo Malafaia writed:
all: test
test.exe: test.c
gcc.exe $(GTK_CFLAGS) $(GTK_LIBS) test.c -o test.exe
try to put $(GTK_LIBS) to the end of the command line
gcc.exe $(GTK_CFLAGS) -o test.exe teste.c $(GTK_LIBS)
thanks a lot everyone!
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]