Hi, I am trying to compile and link a set of c files using gcc under cygwin.. I need to link the wsock32 library with my files but it doesn't seem to work because I keep getting errors related to the wsock32 stuff. Here are the error messages.. /cygdrive/c/WINNT/TEMP/ccRNnj43.o(.text+0x81):hprof_io.c: undefined reference to `_ntohl@4' /cygdrive/c/WINNT/TEMP/ccRNnj43.o(.text+0xab):hprof_io.c: undefined reference to `_ntohs@4' /cygdrive/c/WINNT/TEMP/ccRNnj43.o(.text+0x304):hprof_io.c: undefined reference to `_htonl@4' /cygdrive/c/WINNT/TEMP/ccRNnj43.o(.text+0x338):hprof_io.c: undefined reference to `_htons@4' /cygdrive/c/WINNT/TEMP/ccWLDw2Q.o(.text+0x69):hprof_listener.c: undefined reference to `_recv@16' /cygdrive/c/WINNT/TEMP/ccWLDw2Q.o(.text+0x119):hprof_listener.c: undefined reference to `_ntohs@4' /cygdrive/c/WINNT/TEMP/ccWLDw2Q.o(.text+0x14e):hprof_listener.c: undefined reference to `_ntohl@4' /cygdrive/c/WINNT/TEMP/ccyt4TGz.o(.text+0x1502):hprof_setup.c: undefined reference to `_socket@12' /cygdrive/c/WINNT/TEMP/ccyt4TGz.o(.text+0x1516):hprof_setup.c: undefined reference to `_gethostbyname@4' /cygdrive/c/WINNT/TEMP/ccyt4TGz.o(.text+0x1589):hprof_setup.c: undefined reference to `_htons@4' /cygdrive/c/WINNT/TEMP/ccyt4TGz.o(.text+0x15bc):hprof_setup.c: undefined reference to `_connect@12' /cygdrive/c/WINNT/TEMP/cc5OMmd1.o(.text+0x22):hprof_md.c: undefined reference to `_send@16' /cygdrive/c/WINNT/TEMP/cc5OMmd1.o(.text+0x53):hprof_md.c: undefined reference to `_timeGetTime@0' collect2: ld returned 1 exit status My command line is as follows.. gcc -mno-cygwin -I$JAVA_HOME/include -I$JAVA_HOME/include/win32 -lwsock32 -Wl,--add-stdcall-alias -shared -o bcprofiler.dll file1.c file2.c Is there something wrong with the way I am using the -l option to link? Thanks, Barry