我在尝试构建时一直看到这些错误,我正在尝试构建一个独立的可执行文件,但收效甚微,有人可以建议吗?
undefined reference to `ap_get_server_name'
undefined reference to `apreq_handle_apache2'
undefined reference to `ap_hook_child_init'
undefined reference to `ap_get_server_port'
undefined reference to `ap_hook_handler'
undefined reference to `ap_hook_post_config'
undefined reference to `ap_log_error_'
undefined reference to `ap_get_brigade'
undefined reference to `ap_rwrite'
这主要是我的 makefile 包含的内容:
all:libBidRequestTest.so InitTest
libBidRequestTest.so:
g++ -g -fPIC -shared $(OBJS) -lxerces-c -lrtbshm -lb64 -lapr-1 -laprutil-1 -lapreq2 -lpcre -lrt -lpthread -lboost_date_time -lboost_thread -lzdb -lOpenRTBv1 -lOpenRTBv2 -lAdX -lRubicon -lIP2Location -L$(PREFIX)/lib -L../common/shm -L../common/base64 -o /usr/local/infinity/lib/$@
InitTest: InitTest.cpp
g++ -g -fPIC $< $(APXS_CFLAGS) $(APXS_CFLAGS_SHLIB) $(INCLUDES) -I$(APXS_INCLUDEDIR) $(INCLUDES) -lboost_filesystem -lboost_unit_test_framework -lBidRequestTest -ldl -lboost_system -L/usr/local/infinity/apache/lib -o $@