pthread_once and pthread_key

gcc -o zrpc_server zrpc_server.c zrpc.c cJSON.c -I ./NtyCo/core/ -L ./NtyCo/ -lntyco /usr/bin/ld: ./NtyCo//libntyco.a(nty_schedule.o): in function `nty_schedule_search_wait': nty_schedule.c:(.text+0x1c4e): undefined reference to `pthread_getspecific' /usr/bin/ld: ./NtyCo//libntyco.a(nty_schedule.o): in function `nty_schedule_desched_wait': nty_schedule.c:(.text+0x1cb3): undefined reference to `pthread_getspecific' /usr/bin/ld: ./NtyCo//libntyco.a(nty_schedule.o): in function `nty_schedule_free': nty_schedule.c:(.text+0x2108): undefined reference to `pthread_setspecific' /usr/bin/ld: ./NtyCo//libntyco.a(nty_schedule.o): in function `nty_schedule_create': nty_schedule.c:(.text+0x216d): undefined reference to `pthread_setspecific' /usr/bin/ld: nty_schedule.c:(.text+0x2292): undefined reference to `pthread_setspecific' /usr/bin/ld: ./NtyCo//libntyco.a(nty_schedule.o): in function `nty_schedule_run': nty_schedule.c:(.text+0x2349): undefined reference to `pthread_getspecific' /usr/bin/ld: nty_schedule.c:(.text+0x24fc): undefined reference to `pthread_getspecific' /usr/bin/ld: nty_schedule.c:(.text+0x2597): undefined reference to `pthread_getspecific' /usr/bin/ld: nty_schedule.c:(.text+0x26b3): undefined reference to `pthread_setspecific' /usr/bin/ld: ./NtyCo//libntyco.a(nty_coroutine.o): in function `nty_coroutine_resume': nty_coroutine.c:(.text+0x252): undefined reference to `pthread_getspecific' /usr/bin/ld: ./NtyCo//libntyco.a(nty_coroutine.o): in function `nty_coroutine_renice': nty_coroutine.c:(.text+0x336): undefined reference to `pthread_getspecific' /usr/bin/ld: nty_coroutine.c:(.text+0x34f): undefined reference to `pthread_getspecific' /usr/bin/ld: nty_coroutine.c:(.text+0x364): undefined reference to `pthread_getspecific' /usr/bin/ld: ./NtyCo//libntyco.a(nty_coroutine.o): in function `nty_coroutine_sleep': nty_coroutine.c:(.text+0x38f): undefined reference to `pthread_getspecific' /usr/bin/ld: ./NtyCo//libntyco.a(nty_coroutine.o):nty_coroutine.c:(.text+0x3ff): more undefined references to `pthread_getspecific' follow /usr/bin/ld: ./NtyCo//libntyco.a(nty_coroutine.o): in function `nty_coroutine_create': nty_coroutine.c:(.text+0x45a): undefined reference to `pthread_once' /usr/bin/ld: nty_coroutine.c:(.text+0x470): undefined reference to `pthread_getspecific' /usr/bin/ld: nty_coroutine.c:(.text+0x576): undefined reference to `pthread_getspecific' /usr/bin/ld: ./NtyCo//libntyco.a(nty_coroutine.o): in function `nty_coroutine_sched_key_creator': nty_coroutine.c:(.text.startup+0x17): undefined reference to `pthread_key_create' /usr/bin/ld: nty_coroutine.c:(.text.startup+0x28): undefined reference to `pthread_setspecific' /usr/bin/ld: /tmp/ccluLM8q.o: in function `zrpc_method_find': zrpc.c:(.text+0x2cd): undefined reference to `dlopen' /usr/bin/ld: zrpc.c:(.text+0x2fd): undefined reference to `dlsym' /usr/bin/ld: /tmp/ccluLM8q.o: in function `zrpc_caller_name': zrpc.c:(.text+0x791): undefined reference to `dladdr' /usr/bin/ld: ./NtyCo//libntyco.a(nty_socket.o): in function `nty_poll_inner.part.0.constprop.1.isra.0': nty_socket.c:(.text+0x24): undefined reference to `pthread_getspecific' /usr/bin/ld: ./NtyCo//libntyco.a(nty_socket.o): in function `nty_poll_inner.part.0.constprop.0.isra.0': nty_socket.c:(.text+0x184): undefined reference to `pthread_getspecific' /usr/bin/ld: ./NtyCo//libntyco.a(nty_socket.o): in function `init_hook': nty_socket.c:(.text+0x2d7): undefined reference to `dlsym' /usr/bin/ld: nty_socket.c:(.text+0x2f1): undefined reference to `dlsym' /usr/bin/ld: nty_socket.c:(.text+0x30b): undefined reference to `dlsym' /usr/bin/ld: nty_socket.c:(.text+0x325): undefined reference to `dlsym' /usr/bin/ld: nty_socket.c:(.text+0x33f): undefined reference to `dlsym' /usr/bin/ld: ./NtyCo//libntyco.a(nty_socket.o):nty_socket.c:(.text+0x359): more undefined references to `dlsym' follow /usr/bin/ld: ./NtyCo//libntyco.a(nty_socket.o): in function `read': nty_socket.c:(.text+0x419): undefined reference to `pthread_getspecific' /usr/bin/ld: ./NtyCo//libntyco.a(nty_socket.o): in function `recv': nty_socket.c:(.text+0x4fe): undefined reference to `pthread_getspecific' /usr/bin/ld: ./NtyCo//libntyco.a(nty_socket.o): in function `recvfrom': nty_socket.c:(.text+0x688): undefined reference to `pthread_getspecific' /usr/bin/ld: ./NtyCo//libntyco.a(nty_socket.o): in function `nty_sendto': nty_socket.c:(.text+0x93f): undefined reference to `pthread_getspecific' /usr/bin/ld: ./NtyCo//libntyco.a(nty_socket.o): in function `socket': nty_socket.c:(.text+0xad8): undefined reference to `pthread_getspecific' /usr/bin/ld: ./NtyCo//libntyco.a(nty_socket.o):nty_socket.c:(.text+0xcbf): more undefined references to `pthread_getspecific' follow collect2: error: ld returned 1 exit status
08-31
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值