Wireshark-dev: [Wireshark-dev] Unresolved symbol problem with a tap (__imp__a_global_variant)
From: "Michael Lum" <[email protected]>
Date: Wed, 12 Jul 2006 11:08:14 -0700
Hello,

I am using:

Windows XP
Visual C++ 6.0

I have built a few versions of ethereal successfully (not wireshark yet).

I am currently trying to rebuild ethereal-0.99.0 after modifying the
ANSI A-interface dissector, packet-ansi_a.c

I am getting the following errors but I can't figure out what the problem
is.
(I have tried 'distclean' but it didn't make a difference.)

Part of the problem is that there are no complaints about
'ansi_a_ios401_bsmap_strings' and 'ansi_a_ios401_dtap_strings' which
are defined in the exact same manner!(?)

This is from *** packet-ansi_a.h ***

----------------------------------------------------------------------------
--
/*
 * the following allows TAP code access to the messages
 * without having to duplicate it. With MSVC and a
 * libethereal.dll, we need a special declaration.
 */
ETH_VAR_IMPORT const ext_value_string_t *ansi_a_bsmap_strings;
ETH_VAR_IMPORT const ext_value_string_t *ansi_a_dtap_strings;
ETH_VAR_IMPORT const ext_value_string_t ansi_a_ios501_bsmap_strings[];
ETH_VAR_IMPORT const ext_value_string_t ansi_a_ios501_dtap_strings[];
ETH_VAR_IMPORT const ext_value_string_t ansi_a_ios401_bsmap_strings[];
ETH_VAR_IMPORT const ext_value_string_t ansi_a_ios401_dtap_strings[];

#define A_VARIANT_IS634         4
#define A_VARIANT_TSB80         5
#define A_VARIANT_IS634A        6
#define A_VARIANT_IOS2          7
#define A_VARIANT_IOS3          8
#define A_VARIANT_IOS401        9
#define A_VARIANT_IOS501        10

ETH_VAR_IMPORT gint a_global_variant;
----------------------------------------------------------------------------
--

This is from *** packet-ansi_a.c ***

----------------------------------------------------------------------------
--
gint a_global_variant = A_VARIANT_IOS401;

const ext_value_string_t ansi_a_ios501_bsmap_strings[] =
{
    { 0x69,     "Additional Service Notification",      0 },
    { 0x65,     "ADDS Page",    1 },
  ...


const ext_value_string_t ansi_a_ios401_bsmap_strings[] =
{
    { 0x69,     "Additional Service Notification",      0 },
  ...

----------------------------------------------------------------------------
--

This is from *** ansi_a_stat.c ***

----------------------------------------------------------------------------
--
    switch (a_global_variant)
    {
    default:
        x_ansi_a_bsmap_strings = ansi_a_ios401_bsmap_strings;
        x_ansi_a_dtap_strings = ansi_a_ios401_dtap_strings;
        break;

    case A_VARIANT_IOS501:
        x_ansi_a_bsmap_strings = ansi_a_ios501_bsmap_strings;
        x_ansi_a_dtap_strings = ansi_a_ios501_dtap_strings;
        break;
    }
----------------------------------------------------------------------------
--

The command 'nmake -f Makefile.nmake' results in the following:

        cd ..
Linking ethereal.exe
        link @C:\DOCUME~1\mlum.BC\LOCALS~1\Temp\nma04880.
libui.lib(ansi_a_stat.obj) : error LNK2001: unresolved external symbol
__imp__ansi_a_ios501_dtap_strin
gs
libui.lib(ansi_a_stat.obj) : error LNK2001: unresolved external symbol
__imp__ansi_a_ios501_bsmap_stri
ngs
libui.lib(ansi_a_stat.obj) : error LNK2001: unresolved external symbol
__imp__a_global_variant
ethereal.exe : fatal error LNK1120: 3 unresolved externals
NMAKE : fatal error U1077: 'link' : return code '0x460'
Stop.

Any help would be greatly appreciated.
Thank you.

(PS.  If you need any more info let me know.)

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