我正在尝试通过编辑Wireshark的Makefile.am来创建一个共享库来创建一个“libtshark”...为此,我正在尝试构建一个tshark_lib.c,它与tshark.c与main相同(剥去它。
所以我编辑了Makefile.am以包含以下内容以尝试构建共享的libtshark库:
lib_LTLIBRARIES = libtshark.la
libtshark_la_LDFLAGS = -version-info 0:1:0 -export-symbols libtshark.sym @LDFLAGS_SHAREDLIB@
libtshark_la_SOURCES = \
$(WIRESHARK_COMMON_SRC) \
$(SHARK_COMMON_CAPTURE_SRC) \
$(TSHARK_TAP_SRC) \
capture_opts.c \
capture_sync.c \
tempfile.c \
tshark-tap-register.c \
tshark_lib.c
# Libraries and plugin flags with which to link tshark.
libtshark_la_LIBADD = \
wiretap/libwiretap.la \
epan/libwireshark.la \
wsutil/libwsutil.la \
@SSL_LIBS@ \
$(plugin_ldadd) \
@PCRE_LIBS@ \
@GLIB_LIBS@ -lm \
@PCAP_LIBS@ \
@SOCKET_LIBS@ \
@NSL_LIBS@ \
@C_ARES_LIBS@ \
@ADNS_LIBS@ \
@KRB5_LIBS@ \
@CORESERVICES_FRAMEWORKS@ \
@LIBGCRYPT_LIBS@ \
@LIBGNUTLS_LIBS@ \
@LIBSMI_LDFLAGS@
#tshark_CFLAGS = $(AM_CLEAN_CFLAGS) $(py_dissectors_dir)
libtshark_la_DEPENDENCIES = \
${top_builddir}/epan/libwireshark.la \
${top_builddir}/wsutil/libwsutil.la \
${top_builddir}/wiretap/libwiretap.la \
libtshark.sym
但是,当我尝试现在构建代码时,我收到以下错误:
make[2]: *** No rule to make target `libtshark.sym', needed by `libtshark.la'. Stop.
出于某种原因,它没有使用我的'libtshark_la_LDFLAGS',它包含'-export-symbols libtshark.sym'......有谁知道我可能会遗漏什么?
以下是整个Makefile.am,对于stackoverflow来说太长了:Makefile.am
答案 0 :(得分:0)
事实证明,.sym文件是由wireshark脚本预先生成的,用于确定要导出的符号。