[gnet-dev] gnet 1.1.8 build under MinGW
- From: martyn 2 russell bt com
- To: gnet-dev gnetlibrary org
- Subject: [gnet-dev] gnet 1.1.8 build under MinGW
- Date: Mon, 24 Feb 2003 10:46:07 -0000
Ok. I have MSYS ver 1.0.8 and MinGW 2.0.0.
I downloaded the Windows source to build under MinGW and it did not compile
out of the box correctly.
Given that the makefile is Makefile.mingw, I proceeded with
make -f Makefile.mingw
Before it would compile, I had to do the following:
cp gnetconfig.h.win32 gnetconfig.h
cp config.h.win32 config.h
Also, changes to the actual make file were needed. The makefile assumes
that glib is installed locally in a static path. May I suggest the
following patch to fix this so that pkg-config is used to obtain the libs
and cflags... In addition to this, the current directory was not included.
<<patch.txt>>
Regards,
Martyn
--- ../gnet-src-1.1.8-20030126-original/makefile.mingw Tue Sep 10 21:44:02 2002
+++ makefile.mingw Mon Feb 24 10:28:56 2003
@@ -1,7 +1,7 @@
CC = gcc
FLAGS = -g -Wall -mno-cygwin -mcpu=pentium -DGNET_EXPERIMENTAL=1
-INCLUDE = -I../glib -I. -L../glib -L.
-LIBS = -lglib-2.0-0 -lws2_32
+INCLUDE = -I./ `pkg-config --cflags glib-2.0`
+LIBS = `pkg-config --libs glib-2.0` -lws2_32
OFILES = udp.o tcp.o iochannel.o inetaddr.o mcast.o gnet.o gnet-private.o sha.o md5.o url.o pack.o conn.o server.o socks.o socks-private.o
all:
@@ -20,4 +20,4 @@
$(CC) $(FLAGS) $(INCLUDE) -c server.c
$(CC) $(FLAGS) $(INCLUDE) -c socks.c
$(CC) $(FLAGS) $(INCLUDE) -c socks-private.c
- dllwrap $(INCLUDE) --export-all --output-def gnet.def --implib libgnet-1.1.a -o gnet-1.1.dll $(OFILES) $(LIBS)
\ No newline at end of file
+ dllwrap $(INCLUDE) --export-all --output-def gnet.def --implib libgnet-1.1.a -o gnet-1.1.dll $(OFILES) $(LIBS)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]