Linnk serproxy with mingw

I have source code of serproxy 1.2.0 and mingw. I don’t have visual studio.

Could Somebody help me to link serproxy under Win Vista with mingw only ?

thank you

you can download Visual Studio Express for free - http://www.microsoft.com/express/

would like to update unix makefile in order to avoid visual studio

Visual Studio Express 2010 does not happen to convert dsp file.

I switch to mingw compilation and modified the makefile like that in order to be compatible with mingw:

#
# File: Linux serproxy makefile
#
# (C)1999 Stefano Busti
#

VERSION = `cat VERSION`

INC = \
      C:/MinGW/msys/1.0/include

SRCS = \
  main.c sio.c sock.c thread.c vlist.c cfglib.c config.c string.c \
  pipe.c error.c

OBJS = \
  main.o sio.o sock.o thread.o vlist.o cfglib.o config.o string.o \
  pipe.c error.c

CC = gcc

ifdef DEBUG
CFLAGS = -I$(INC) -Wall -g -D__UNIX__ -DDEBUG
else
CFLAGS = -I$(INC) -Wall -O2 -fomit-frame-pointer -D__UNIX__
endif

ifdef USE_EF
LIBS= -lpthread -lefence
else
LIBS= -lpthread
endif

# Build the program

serproxy: $(SRCS) $(OBJS)
    $(CC) $(CFLAGS)  -o serproxy $(OBJS) $(LDFLAGS) $(LIBS)

install: serproxy
    cp -f serproxy c:/temp

clean:
    del /F *.o

realclean:
    del /F *.o serproxy *.gz *.zip

dep:
    makedepend -Y -- $(CFLAGS) -- $(SRCS) 2&>/dev/null

# DO NOT DELETE

main.o: sio.h sock.h pipe.h thread.h vlist.h cfglib.h config.h error.h
sio.o: sio.h
sock.o: sock.h
thread.o: thread.h
vlist.o: vlist.h
cfglib.o: cfglib.h
config.o: config.h cfglib.h string.h
string.o: string.h
pipe.o: pipe.h sio.h sock.h thread.h
error.o: error.h

and I got this error:

|| gcc -IC:/MinGW/msys/1.0/include -Wall -O2 -fomit-frame-pointer -D_UNIX_ -c -o main.o main.c In file included from c:\mingw\bin..\lib\gcc\mingw32\4.5.0........\include\windows.h|98| 0, || from sio.h:21, || from main.c:24: c:\mingw\bin..\lib\gcc\mingw32\4.5.0........\include\winsock2.h|103 col 2| warning: #warning "fd_set and associated macros have been defined in sys/types. This may cause runtime problems with W32 sockets" c:\mingw\bin..\lib\gcc\mingw32\4.5.0........\include\winsock2.h|109 col 8| error: redefinition of 'struct timeval' C:\MinGW\msys\1.0\include\sys\time.h|16 col 8| note: originally defined here In file included from thread.h|12| 0, || from pipe.h:6, || from main.c:26: C:\MinGW\msys\1.0\include\pthread.h|71 col 42| error: expected ')' before '*' token

Can somebody help me ?

You might try to remove the INC directory as that may cause a conflict (redefinitions)

interesting read - http://www.gnu.org/software/make/manual/make.html - not for the faint of heart ;)