From: ni va <niv...@gm...> - 2011-04-01 04:57:44
|
> Add '-lws2_32' to the gcc link command. This is the result : || gcc -I -Wall -O2 -lws2_32 -o serproxy main.o sio.o sock.o thread.o vlist.o cfglib.o config.o string.o pipe.c error.c -LC:/MinGW/msys/1.0/include -lpthread || main.o:main.c:(.text+0xf1): référence indéfinie vers « select@20 » || main.o:main.c:(.text+0x139): référence indéfinie vers « __WSAFDIsSet@8 » ... || main.o:main.c:(.text+0x76f): référence indéfinie vers « select@20 » || main.o:main.c:(.text+0x7c8): référence indéfinie vers « __WSAFDIsSet@8 » || sock.o:sock.c:(.text+0x1b): référence indéfinie vers « WSAStartup@8» || sock.o:sock.c:(.text+0x3f): référence indéfinie vers « closesocket@4» || sock.o:sock.c:(.text+0x76): référence indéfinie vers « socket@12 » > C:/MinGW/msys/1.0/include > Do you really want to build this as an MSYS-dependent application? > If so, are you sure you're using the MSYS toolchain, rather than > the native MinGW one? Have you considered using Cygwin instead? I didn't know what was msys and I have added native mingw msys in order to satisfy the compilation of sock.c file. #include "sock.h" #if defined(SOCK_BSD) # include <unistd.h> # include <sys/types.h> # include <sys/socket.h> # include <netdb.h> # include <netinet/in.h> # include <arpa/inet.h> # include <fcntl.h> # include <sys/ioctl.h> #elif defined(SOCK_WIN) # define ioctl ioctlsocket #endif int sock_start(void) { > > LIBS= -LC:/MinGW/msys/1.0/include -lpthread > It seems odd to add an include directory to the linker path. Is > there really a pthread library there? I don't know what is lpthread. this was in the unix makefile so I don't modify its call > Why not use 'rm'? Are you using CMD.EXE as your shell for building > an MSYS application? I just understood that msys is a collection of native unix commands and utilities under unix that I know well but.. I am under vista and then I have replace rm by del /f |