Ethereal-dev: RE: [Ethereal-dev] Unresolved symbols when building plugin under Windows

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: "Michael Lum" <mlum@xxxxxxxxxxxxx>
Date: Thu, 6 Nov 2003 11:22:44 -0800
That's what I originally did, I copied the MGCP one and
replaced "mgcp" with "gsm_map".

In config.nmake I have this:
	LOCAL_LDFLAGS=/DEBUG /NODEFAULTLIB:libc.lib

This is the last thing I tried in plugins/gsm_map/Makefile.nmake:

gsm_map.dll gsm_map.exp gsm_map.lib : packet-gsm_map.obj ..\plugin_api.obj
        link -dll /out:gsm_map.dll packet-gsm_map.obj ..\plugin_api.obj \
        ..\..\asn1.obj \
        ..\..\epan\ethereal.lib \
        $(GLIB_LIBS)

This is the output when running nmake:

        link -dll /out:gsm_map.dll packet-gsm_map.obj ..\plugin_api.obj
..\..\a
sn1.obj  ..\..\epan\ethereal.lib
C:\ethereal-win32-libs\glib\lib\glib-2.0.lib
C:\ethereal-win32-libs\glib\lib\gmodule-2.0.lib
C:\ethereal-win32-libs\glib\lib
\gobject-2.0.lib
Microsoft (R) Incremental Linker Version 7.10.3077
Copyright (C) Microsoft Corporation.  All rights reserved.

   Creating library gsm_map.lib and object gsm_map.exp
asn1.obj : error LNK2019: unresolved external symbol __imp___snprintf
referenced
 in function _asn1_err_to_str
ethereal.lib(tvbuff.obj) : error LNK2019: unresolved external symbol
__imp__strn
cmp referenced in function _tvb_strneql
ethereal.lib(tvbuff.obj) : error LNK2019: unresolved external symbol
__imp__strn
icmp referenced in function _tvb_strncaseeql
OLDNAMES.lib(strnicmp.obi) : error LNK2001: unresolved external symbol
__imp__st
rnicmp
ethereal.lib(except.obj) : error LNK2019: unresolved external symbol
__imp___ass
ert referenced in function _except_init
ethereal.lib(except.obj) : error LNK2019: unresolved external symbol
__imp__abor
t referenced in function _unhandled_catcher
ethereal.lib(except.obj) : error LNK2019: unresolved external symbol
__imp__fpri
ntf referenced in function _unhandled_catcher
ethereal.lib(except.obj) : error LNK2001: unresolved external symbol
__imp___iob

ethereal.lib(except.obj) : error LNK2019: unresolved external symbol
__imp__long
jmp referenced in function _do_throw
ethereal.lib(except.obj) : error LNK2019: unresolved external symbol
__imp__vspr
intf referenced in function _except_throwf
ethereal.lib(strutil.obj) : error LNK2019: unresolved external symbol
__imp__mem
chr referenced in function _find_line_end
OLDNAMES.lib(strnicmp.obi) : error LNK2001: unresolved external symbol
__imp___s
trnicmp
gsm_map.dll : fatal error LNK1120: 11 unresolved externals
NMAKE : fatal error U1077: 'link' : return code '0x460'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual Studio .NET
2003\
VC7\BIN\nmake.exe"' : return code '0x2'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual Studio .NET
2003\
VC7\BIN\nmake.exe"' : return code '0x2'
Stop.


> -----Original Message-----
> From: Guy Harris [mailto:guy@xxxxxxxxxxxx]
> Sent: Thursday, November 06, 2003 1:35 AM
> To: Michael Lum
> Cc: Ethereal
> Subject: Re: [Ethereal-dev] Unresolved symbols when building plugin
> under Windows
>
>
> On Wed, Nov 05, 2003 at 07:58:34PM -0800, Michael Lum wrote:
> > I'm trying to build a GSM MAP plugin under Windows 2K, using VS.NET C++.
> >
> > The plugin uses asn1 functions and I'm not sure how to setup a
> > Makefile.nmake file.
>
> If you're building it in a subdirectory of the "plugins" directory of
> the Ethereal source tree, the way you set up a Makefile.nmake file is
> you copy one from another plugin (other than the GIOP one - and use the
> current CVS versions) and:
>
> 	change it to set OBJECTS to the appropriate list of objects
> 	(e.g., packet-gsm_map.obj);
>
> 	replace the plugin name (e.g., "acn" in
> 	"plugins/acn/Makefile.nmake") with your plugin's name
> 	("gsm_map").
>
> (The latter would, if you have only one source file, take care of the
> former - but if you have more than one, it won't.)