0
我有問題,將libevent鏈接到我的Ubuntu項目14.04 LTS服務器上。一切工作正常ArchLinux和Centos7(我在虛擬機上運行的Ubuntu和CentOS)。
這些是我的Makefile:
libevent在Ubuntu服務器上連接問題14.04
TARGET: opoznienia
CFLAGS = -Wall -O2 --std=c11 -D DEBUG=1 $(shell pkg-config --cflags libevent_pthreads) -pthread -Wextra
LFLAGS = -Wall $(shell pkg-config --libs libevent_pthreads) -pthread -Wextra
OFILES = main.o err.o dropnobody.o ... <-- tl;tr
opoznienia: $(OFILES)
$(CC) $(LFLAGS) $^ -o [email protected]
.PHONY: clean TARGET
clean:
rm -f opoznienia *.o *~ *.bak
在Ubuntu上,我得到錯誤:
telnet_server.c:(.text+0xfc): undefined reference to `event_new'
請發佈編譯器輸出。導致此錯誤消息 – arved