Anmelden

Archiv verlassen und diese Seite im Standarddesign anzeigen : Programme mit Posix-Threads lasse sich nicht statisch binden



nobody0
02-03-2005, 17:06
Ich wollte ein Programm mit Posix-Threads statisch linken, aber das kann der Linker nicht:



> gcc -static -Wall -I. -O3 -D_GNU_SOURCE -D__SMP__ -DLINUX -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_REENTRANT -lpthread -lrt -funroll-loops -fexpensive-optimizations -ffast-math -lm -DCPU=686 -o relais relais.c
/tmp/ccuFYMB5.o(.text+0x2d5): In function `sig_handler1':
: undefined reference to `pthread_exit'
/tmp/ccuFYMB5.o(.text+0x376): In function `func_timeout':
: undefined reference to `pthread_kill'
/tmp/ccuFYMB5.o(.text+0x390): In function `func_timeout':
: undefined reference to `pthread_exit'
/tmp/ccuFYMB5.o(.text+0x624): In function `func_open':
: undefined reference to `pthread_exit'
/tmp/ccuFYMB5.o(.text+0xb07): In function `main':
: undefined reference to `pthread_create'
/tmp/ccuFYMB5.o(.text+0xb30): In function `main':
: undefined reference to `pthread_create'
/tmp/ccuFYMB5.o(.text+0xb53): In function `main':
: undefined reference to `pthread_join'
/tmp/ccuFYMB5.o(.text+0xb73): In function `main':
: undefined reference to `pthread_join'
collect2: ld returned 1 exit status


Woran liegt das; was kann man da machen? :confused: