Read and respond to this message at: https://sourceforge.net/forum/message.php?msg_id=3303285 By: huangxiangkui
Hello,everyone I am a Chinese student in Shanghai. I have some problem on using libwg32c. I like POSIX,but my windows operating system is not support. For example,there is no fork() function in win32. So I try to build my programe by MinGW and libwg32c. But in China,there is not many information on libwg32c.And I could not use the libwg32c successfully every time. My Code is below. /* main.c */ #include <sys/types.h> #include <sys/socket.h> #include <netinet/in.h> #include <stdio.h> int main(int argc ,char **argv) { int sockfd; sockfd = socket(AF_INET,SOCK_DGRAM,0); return(0); } /* main.c end*/ My Makefile is below # Makefile.txt all: gcc -c "main.c" -o "main.o" -D__GW32C__ -I"D:/Program Files/GnuWin32/include/glibc" -I"D:/Program Files/GnuWin32/include/winx" gcc "main.o" -o "main.exe" -L"D:/Program Files/GnuWin32/lib -l"gw32c" -l"wsock32" -l"ole32" -l"uuid" #Makefile.txt end But the error is appear. gcc -c "main.c" -o "main.o" -D__GW32C__ -I"D:/Program Files/GnuWin32/include/gli bc" -I"D:/Program Files/GnuWin32/include/winx" gcc "main.o" -o "main.exe" -L"D:/Program Files/GnuWin32/lib -l"gw32c" -l"wsock32 " -l"ole32" -l"uuid" main.o(.text+0x42):main.c: undefined reference to `socket' collect2: ld returned 1 exit status mingw32-make: *** [all] Error 1 I don't know what's worroy with the lib or my source? My tools are show below. MinGW32: binutils-2.15.91-20040904-1.tar.gz gcc-core-3.4.2-20040916-1.tar.gz mingw-runtime-3.7.tar.gz w32api-3.2.tar.gz mingw32-make-3.80.0-3.tar.gz LibGW32C: libgw32c-0.4.exe Operating System: Windows XP Home Edition Wait for your help. Please HELP me. Huangxiangkui ______________________________________________________________________ You are receiving this email because you elected to monitor this forum. To stop monitoring this forum, login to SourceForge.net and visit: https://sourceforge.net/forum/unmonitor.php?forum_id=74807 ------------------------------------------------------- SF.Net email is Sponsored by the Better Software Conference & EXPO September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf _______________________________________________ GnuWin32-Users mailing list GnuWin32-Users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gnuwin32-users