Ethereal-dev: [PATCH] (Re: [Ethereal-dev] Current CVS build fails on Windows)

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

From: Noah Misch <noah@xxxxxxxxxxxxxx>
Date: Sun, 20 Jun 2004 09:28:48 -0700
On Sun, Jun 20, 2004 at 10:52:01AM +0200, Anders Broman wrote:
> Hi,
> Building from today's tarball I get the following error:
> mergecap.c
> Linking mergecap.exe
>         link @C:\DOCUME~1\GAREN~1\LOKALA~1\Temp\nmd03760.
> mergecap.obj : error LNK2001: unresolved external symbol
> _merge_close_outfile
> mergecap.obj : error LNK2001: unresolved external symbol _merge_files
...

Index: Makefile.common
===================================================================
RCS file: /cvsroot/ethereal/Makefile.common,v
retrieving revision 1.48
diff -u -r1.48 Makefile.common
--- Makefile.common	18 Jun 2004 10:01:59 -0000	1.48
+++ Makefile.common	20 Jun 2004 00:03:27 -0000
@@ -372,8 +372,7 @@
 # mergecap specifics
 mergecap_SOURCES = \
 	mergecap.c \
-	merge.c \
-	cvsversion.h
+	merge.c
 
 # editcap specifics
 editcap_SOURCES = \
Index: Makefile.nmake
===================================================================
RCS file: /cvsroot/ethereal/Makefile.nmake,v
retrieving revision 1.420
diff -u -r1.420 Makefile.nmake
--- Makefile.nmake	21 May 2004 17:25:32 -0000	1.420
+++ Makefile.nmake	20 Jun 2004 00:03:27 -0000
@@ -44,6 +44,7 @@
 
 ethereal_OBJECTS = $(ethereal_SOURCES:.c=.obj)
 tethereal_OBJECTS = $(tethereal_SOURCES:.c=.obj)
+mergecap_OBJECTS = $(mergecap_SOURCES:.c=.obj) getopt.obj
 dftest_OBJECTS = $(dftest_SOURCES:.c=.obj)
 
 randpkt_OBJECTS = $(randpkt_SOURCES:.c=.obj)
@@ -173,10 +174,10 @@
 		/OUT:editcap.exe $(conflags) $(conlibsdll) $(LDFLAGS) /SUBSYSTEM:console editcap.obj getopt.obj $(editcap_LIBS) image\editcap.res
 <<
 
-mergecap.exe	: config.h cvsversion.h mergecap.obj getopt.obj wiretap\wiretap-$(WTAP_VERSION).lib image\mergecap.res
+mergecap.exe	: config.h cvsversion.h $(mergecap_OBJECTS) wiretap\wiretap-$(WTAP_VERSION).lib image\mergecap.res
 	@echo Linking $@
 	$(LINK) @<<
-		/OUT:mergecap.exe $(conflags) $(conlibsdll) $(LDFLAGS) /SUBSYSTEM:console mergecap.obj getopt.obj $(mergecap_LIBS) image\mergecap.res
+		/OUT:mergecap.exe $(conflags) $(conlibsdll) $(LDFLAGS) /SUBSYSTEM:console $(mergecap_OBJECTS) $(mergecap_LIBS) image\mergecap.res
 <<
 
 text2pcap.exe	: config.h text2pcap.obj text2pcap-scanner.obj getopt.obj strptime.obj image\text2pcap.res