/tmp/ccYR00NJ.o(.text+0x4: In function `main':
clone_call.c: undefined reference to `sem_init'
/tmp/ccYR00NJ.o(.text+0x64):clone_call.c: undefined reference to `sem_init'
/tmp/ccYR00NJ.o(.text+0x13f): In function `producer':
clone_call.c: undefined reference to `sem_wait'
/tmp/ccYR00NJ.o(.text+0x1d9):clone_call.c: undefined reference to `sem_post'
/tmp/ccYR00NJ.o(.text+0x233): In function `consumer':
clone_call.c: undefined reference to `sem_wait'
/tmp/ccYR00NJ.o(.text+0x2a:clone_call.c: undefined reference to `sem_post'
collect2: ld returned 1 exit status
08049ba4 B bp
08049b98 A __bss_start
08049be0 B buffer
080485e4 t call_gmon_start
U clone@@GLIBC_2.0
08049ba0 b completed.1
08048870 T consumer
08049a68 d __CTOR_END__
08049a64 d __CTOR_LIST__
08049b8c D __data_start
08049b8c W data_start
080489a0 t __do_global_ctors_aux
08048610 t __do_global_dtors_aux
08049b90 D __dso_handle
08049a70 d __DTOR_END__
08049a6c d __DTOR_LIST__
08049a78 D _DYNAMIC
08049b98 A _edata
08049c20 A _end
U exit@@GLIBC_2.0
080489c4 T _fini
08049a64 A __fini_array_end
08049a64 A __fini_array_start
080489e0 R _fp_hw
08048640 t frame_dummy
08048a60 r __FRAME_END__
08049b4c D _GLOBAL_OFFSET_TABLE_
w __gmon_start__
080484bc T _init
08049a64 A __init_array_end
08049a64 A __init_array_start
080489e4 R _IO_stdin_used
08049a74 d __JCR_END__
08049a74 d __JCR_LIST__
w _Jv_RegisterClasses
08048994 T __libc_csu_fini
08048940 T __libc_csu_init
U __libc_start_main@@GLIBC_2.0
08048674 T main
U malloc@@GLIBC_2.0
08049bc0 B mutex
08049b94 d p.0
08049a64 A __preinit_array_end
08049a64 A __preinit_array_start
U printf@@GLIBC_2.0
08048780 T producer
08049c10 B product
U pthread_mutex_init@@GLIBC_2.0
U pthread_mutex_lock@@GLIBC_2.0
U pthread_mutex_unlock@@GLIBC_2.0
U sem_init@@GLIBC_2.1
U sem_post@@GLIBC_2.1
U sem_wait@@GLIBC_2.1
U sleep@@GLIBC_2.0
080485c0 T _start
U strcpy@@GLIBC_2.0
08049c00 B warehouse
當我編譯它時
/home/public/glomosim/main >make clean
/home/public/glomosim/main >make
它出現一些錯誤訊息
../network/dsr.o: In function `RoutingDsrInitStats':
../network/dsr.pc:1296: undefined reference to `pthread_create'
collect2: ld returned 1 exit status
Failed linking '../bin/glomosim'