Hi I was trying to create a dll for my own dissector, compilation went through, in dll creation I am facing the issue as below. kindly provide views for the issue. Thanks in advance.
link -dll /out:rrc-fsm.dll /NOLOGO /INCREMENTAL:no /DEBUG /MACHINE:x64 /DYNAMICBASE /FIXED:no packet-lte-rrc-fsm.obj plugin.obj ..\..\libwireshark.lib ..\dissectors.lib C:\wireshark-win64-libs-1.8\gtk2\lib\glib-2.0.lib C:\wireshark-win64-libs-1.8\gtk2\lib\gmodule-2.0.lib C:\wireshark-win64-libs-1.8\gtk2\lib\gobject-2.0.lib rrc-fsm.res
dissectors.lib(packet-gsm_a_common.obj) : error LNK2005: de_ms_cm_2 already defined in libwireshark.lib(libwireshark.dll)
dissectors.lib(packet-gsm_a_common.obj) : error LNK2005: de_ms_cm_3 already defined in libwireshark.lib(libwireshark.dll)
dissectors.lib(packet-gsm_a_gm.obj) : error LNK2005: de_gmm_ms_radio_acc_cap already defined in libwireshark.lib(libwireshark.dll)
dissectors.lib(packet-per.obj) : error LNK2005: dissect_per_null already defined in libwireshark.lib(libwireshark.dll)
dissectors.lib(packet-per.obj) : error LNK2005: dissect_per_constrained_sequence_of already defined in libwireshark.lib(libwireshark.dll)
dissectors.lib(packet-per.obj) : error LNK2005: dissect_per_boolean already defined in libwireshark.lib(libwireshark.dll)
dissectors.lib(packet-per.obj) : error LNK2005: dissect_per_constrained_integer already defined in libwireshark.lib(libwireshark.dll)
dissectors.lib(packet-per.obj) : error LNK2005: dissect_per_enumerated already defined in libwireshark.lib(libwireshark.dll)
dissectors.lib(packet-per.obj) : error LNK2005: dissect_per_choice already defined in libwireshark.lib(libwireshark.dll)
dissectors.lib(packet-per.obj) : error LNK2005: dissect_per_sequence already defined in libwireshark.lib(libwireshark.dll)
dissectors.lib(packet-per.obj) : error LNK2005: dissect_per_sequence_eag already defined in libwireshark.lib(libwireshark.dll)
dissectors.lib(packet-per.obj) : error LNK2005: dissect_per_bit_string already defined in libwireshark.lib(libwireshark.dll)
dissectors.lib(packet-per.obj) : error LNK2005: dissect_per_octet_string already defined in libwireshark.lib(libwireshark.dll)
dissectors.lib(packet-per.obj) : error LNK2005: dissect_per_octet_string_containing_pdu_new already defined in libwireshark.lib(libwireshark.dll)
Creating library rrc-fsm.lib and object rrc-fsm.exp
dissectors.lib(packet-gsm_a_common.obj) : error LNK2001: unresolved external symbol tfs_supported_not_supported
dissectors.lib(packet-gsm_a_gm.obj) : error LNK2001: unresolved external symbol tfs_supported_not_supported
dissectors.lib(packet-bssgp.obj) : error LNK2001: unresolved external symbol tfs_supported_not_supported
dissectors.lib(packet-gsm_a_bssmap.obj) : error LNK2001: unresolved external symbol tfs_supported_not_supported
dissectors.lib(packet-nas_eps.obj) : error LNK2019: unresolved external symbol match_strval_idx_ext referenced in function get_nas_esm_msg_params
dissectors.lib(packet-bssgp.obj) : error LNK2001: unresolved external symbol match_strval_idx_ext
dissectors.lib(packet-sgsap.obj) : error LNK2001: unresolved external symbol match_strval_idx_ext
dissectors.lib(packet-gsm_a_bssmap.obj) : error LNK2001: unresolved external symbol match_strval_idx_ext
dissectors.lib(packet-gsm_a_gm.obj) : error LNK2001: unresolved external symbol tfs_present_not_present
dissectors.lib(packet-gsm_a_gm.obj) : error LNK2001: unresolved external symbol tfs_implemented_not_implemented
dissectors.lib(packet-gsm_a_gm.obj) : error LNK2001: unresolved external symbol ipproto_val_ext
dissectors.lib(packet-ip.obj) : error LNK2001: unresolved external symbol ipproto_val_ext
dissectors.lib(packet-gsm_a_dtap.obj) : error LNK2019: unresolved external symbol tvb_get_ephemeral_unicode_string referenced in function de_network_name
dissectors.lib(packet-per.obj) : error LNK2001: unresolved external symbol tvb_get_ephemeral_unicode_string
dissectors.lib(packet-gsm_sms.obj) : error LNK2001: unresolved external symbol tvb_get_ephemeral_unicode_string
dissectors.lib(packet-gsm_a_dtap.obj) : error LNK2019: unresolved external symbol IA5_7BIT_decode referenced in function de_sub_addr
dissectors.lib(packet-gmr1_rr.obj) : error LNK2019: unresolved external symbol proto_tree_add_split_bits_item_ret_val referenced in function gmr1_ie_rr_pkt_imm_ass_3_prm
dissectors.lib(packet-gsm_a_rr.obj) : error LNK2001: unresolved external symbol proto_tree_add_split_bits_item_ret_val
dissectors.lib(packet-bssgp.obj) : error LNK2001: unresolved external symbol tfs_reliable_not_reliable
dissectors.lib(packet-bssgp.obj) : error LNK2001: unresolved external symbol tfs_requested_not_requested
dissectors.lib(packet-gsm_bssmap_le.obj) : error LNK2001: unresolved external symbol tfs_requested_not_requested
asked 01 Dec '15, 11:10
Viswanathan ...
1●1●1●2
accept rate: 0%
edited 01 Dec '15, 13:01
grahamb ♦
19.8k●3●30●206
Thanks many for response, after removing dissector.lib output as
after removing libwireshark.lib output as
The function you are calling (gsm_a_rr_rxlev_vals_ext, ...) are not exported, so you cannot call them from your external dll. They should either be declared as WS_DLL_PUBLIC in Wireshark source code (not likely to happen) or you should redefine them locally. Looks like you copy pasted the lte-rrc dissector code in your DLL. This does not seem to make a lot of sense to me. Again you should not link against dissectors.lib.
the compilation is fine as it went through, the issue is with linking, i.e it is not allowing to call any function from epan\dissectors.
Note that @Viswanathan might be attempting to build an older version, maybe 1.8?
Can you clarify the source version you're working with?
The toolchain is VS2010.
I am using, 1.8.11
Juts a info :I could able to compile & run the wireshark source code base 1.8.11 without any issue