ANNOUNCEMENT: Live Wireshark University & Allegro Packets online APAC Wireshark Training Session
July 17th, 2024 | 10:00am-11:55am SGT (UTC+8) | Online

Wireshark-dev: [Wireshark-dev] Unresolved external symbol linking stats TAP

From: "Michael Lum" <Michael.Lum@xxxxxxxxxx>
Date: Fri, 27 Oct 2006 15:43:16 -0700
Hello,

I am trying to modify the ansi_a_stat.c file.

During linking I get the following error:

Linking wireshark.exe
        link @C:\DOCUME~1\mlum.BC\LOCALS~1\Temp\nma04728.
libui.lib(ansi_a_stat.obj) : error LNK2001: unresolved external symbol
__imp__ansi_a_dtap_strings
libui.lib(ansi_a_stat.obj) : error LNK2001: unresolved external symbol
__imp__ansi_a_bsmap_strings
wireshark.exe : fatal error LNK1120: 2 unresolved externals
NMAKE : fatal error U1077: 'link' : return code '0x460'
Stop.

The definition of ansi_a_dtap_strings is as follows from
epan/dissectors/packet-ansi_a.h:

typedef struct ext_value_string_t
{
    guint32             value;
    const gchar         *strptr;
    guint32             dec_index;
}
ext_value_string_t;

WS_VAR_IMPORT const ext_value_string_t *ansi_a_bsmap_strings;
WS_VAR_IMPORT const ext_value_string_t *ansi_a_dtap_strings;

>From epan/dissectors/packet-ansi_a.c:

const ext_value_string_t *ansi_a_bsmap_strings = NULL;
const ext_value_string_t *ansi_a_dtap_strings = NULL;


The pointers are set in packet-ansi_a.c depending on a configuration
parameter, IOS version.

The previous version, which built and works correctly had the following
definition:

WS_VAR_IMPORT const value_string ansi_a_ios401_bsmap_strings[];


In the new code I have:

WS_VAR_IMPORT const value_string ansi_a_ios401_bsmap_strings[];
WS_VAR_IMPORT const value_string ansi_a_ios501_bsmap_strings[];

The pointer 'ansi_a_bsmap_strings' will be set to one of the above
depending on the current IOS version.


Thanks for your help.


Build environment:

Windows XP
Visual C++

--
Michael Lum                  Principal Software Engineer
4600 Jacombs Road            +1.604.276.0055
Richmond, B.C.
Canada V6V 3B1
UTStarcom Canada, Inc.
CDMA Division