undefined reference to 'pthread_create' from linker
I am having trouble linking the pthread library.
I have -lpthread -lm as options for the GNU GCC compiler. Build Log ------------------------------------------------------------ Compiling: main.c Compiling: matrix.c Compiling: newmalloc.c Linking console executable: bin/Release/optimizer-4 obj/Release/main.o: In function `main': main.c:(.text+0x132): undefined reference to `pthread_attr_setstacksize' main.c:(.text+0x224): undefined reference to `pthread_create' main.c:(.text+0x35b): undefined reference to `pthread_join' collect2: ld returned 1 exit status Process terminated with status 1 (0 minutes, 1 seconds) 3 errors ------------------------------------------------------------- library search: dlyon@dlyon-desktop2:~$ ls /usr/lib |grep pthread libgpgme-pthread.so.11 libgpgme-pthread.so.11.7.0 libpthread.a libpthread_nonshared.a libpthread.so dlyon@dlyon-desktop2:~$ ------------------------------------------------------------- Any ideas would be greatly appreciated! Thanks! |
with out knowing what you are building we can not even guess
something is missing in some code ?? as to what ?? without seeing it .... |
From man gcc (search for -llibrary in there)
Quote:
|
All times are GMT -5. The time now is 06:30 AM. |