Hello everyone, I've recently decided to learn pthreads. I've just finished writing my first pthreads program, and have been able to fix most of the problems that gcc reported to me. However, I am now getting "undefined reference" errors and am not sure why. Can someone help me diagnose this issue? I am using Windows XP 64-bit, I am using Ozkan's toolchain (an old one from 2010-01-23), and I am using the files from pthreads-20100604.zip. (I do not use -pthread because that gives another error, so that's why I'm using -lpthread.) Here are the errors that I am getting:
C:\dir>gcc -o xprp6_4_128.exe sprp6.c -lgmp -lpthread C:\Temp\cciUpjdJ.o:sprp6.c:(.text+0xabc): undefined reference to `pthread_mutex_trylock' C:\Temp\cciUpjdJ.o:sprp6.c:(.text+0xb30): undefined reference to `pthread_mutex_unlock' C:\Temp\cciUpjdJ.o:sprp6.c:(.text+0xf43): undefined reference to `pthread_exit' C:\Temp\cciUpjdJ.o:sprp6.c:(.text+0x1092): undefined reference to `pthread_attr_init' C:\Temp\cciUpjdJ.o:sprp6.c:(.text+0x10a4): undefined reference to `pthread_attr_setdetachstate' C:\Temp\cciUpjdJ.o:sprp6.c:(.text+0x10b5): undefined reference to `pthread_mutex_init' C:\Temp\cciUpjdJ.o:sprp6.c:(.text+0x17a6): undefined reference to `pthread_create' C:\Temp\cciUpjdJ.o:sprp6.c:(.text+0x183e): undefined reference to `pthread_join' C:\Temp\cciUpjdJ.o:sprp6.c:(.text+0x1aa3): undefined reference to `pthread_attr_destroy' C:\Temp\cciUpjdJ.o:sprp6.c:(.text+0x1aaf): undefined reference to `pthread_mutex_destroy' C:\Temp\cciUpjdJ.o:sprp6.c:(.text+0x1ab9): undefined reference to `pthread_exit' collect2: ld returned 1 exit status Does anyone know what I might be doing wrong or how I can fix the above? Thank you for your time. -David C. ------------------------------------------------------------------------------ Nokia and AT&T present the 2010 Calling All Innovators-North America contest Create new apps & games for the Nokia N8 for consumers in U.S. and Canada $10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store http://p.sf.net/sfu/nokia-dev2dev _______________________________________________ Mingw-w64-public mailing list Mingw-w64-public@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mingw-w64-public