Wireshark-dev: [Wireshark-dev] About the compile
From: "??????" <xujiekoo@xxxxxx>
Date: Thu, 2 May 2013 00:18:03 +0800
Hi, all

Now, i want to convert "tshark" to a library(I can use it in my code).  Here is the steps what I did:
1 Made a tshark.c copy which was called "tshark_bk.c??; Modified the entrance function "main" to the any other name, such as "tshark_entrance".
2 Added the following statement to the Makefile.am which is at the top directory
/******************
lib_LTLIBRARIES = libtshark.la
libtshark_la_SOURCES = tshark_bk.c capture_opts.c  cfile.c print.c ps.c disabled_protos.c capture_sync.c capture-pcap-util.c    \
                       sync_pipe_write.c version_info.c clopts_common.c frame_data_sequence.c capture_ui_utils.c capture_ifinfo.c               \
                        ui/cli/tshark-tap-register.c ui/cli/tap-expert.c ui/cli/tap-radiusstat.c ui/cli/tap-rpcstat.c ui/cli/tap-smbstat.c      \
                        ui/cli/tap-camelsrt.c ui/cli/tap-mgcpstat.c ui/cli/tap-funnel.c ui/cli/tap-follow.c ui/cli/tap-httpstat.c               \
                        ui/cli/tap-rtspstat.c ui/cli/tap-sctpchunkstat.c ui/cli/tap-camelcounter.c ui/cli/tap-rtp.c ui/cli/tap-stats_tree.c     \
                        ui/cli/tap-h225counter.c ui/cli/tap-dcerpcstat.c ui/cli/tap-hosts.c  ui/cli/tap-ansi_astat.c ui/cli/tap-megacostat.c    \
                        ui/cli/tap-protohierstat.c ui/cli/tap-h225rassrt.c ui/cli/tap-smbsids.c ui/cli/tap-gsm_astat.c ui/cli/tap-icmpv6stat.c  \
                        ui/cli/tap-icmpstat.c ui/cli/tap-macltestat.c ui/cli/tap-rlcltestat.c ui/cli/tap-protocolinfo.c ui/cli/tap-diameter-avp.c\
                        ui/cli/tap-rpcprogs.c ui/cli/tap-afpstat.c ui/cli/tap-comparestat.c ui/cli/tap-iostat.c ui/cli/tap-scsistat.c           \
                        ui/cli/tap-bootpstat.c ui/cli/tap-sv.c ui/cli/tap-wspstat.c ui/cli/tap-iousers.c ui/cli/tap-sipstat.c                   \
                        timestats.c tap-rtp-common.c tempfile.c tap-megaco-common.c ui/util.c 
                        capture-wpcap.c wsutil/file_util.c 
******************/
3 Then, compiled.

I encountered a err: wsutil/file_util.c is for win32, and it is the only implement of "ws_module_open" in whole source code!!! 
So, i was confused. Can somebody help me? 
By the way, after wireshark is compiled, the output execute file "tshark" and "wireshark" are a shell script file before "make install"...

Thx
------------------
elon