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

Ethereal-dev: [Ethereal-dev] Help: Using a bit of C++

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

From: Jason House <jhouse@xxxxxxxxx>
Date: Wed, 24 Oct 2001 12:02:08 -0400
How do I go about getting C++ files to link with ethereal under win32?



I am using Microsoft Visual C++ 6.0
Unmodified ethereal compiles and runs properly.

I have modified the makefile to include
{$S}.cpp{$O}.obj::
   $(CC) $(CFLAGS) -Fd$O\ -c $<

and I also added MSVCPRT.LIB to ethereal_LIBS



I get the following linking errors:
capture-stats-stl.obj : error LNK2001: unresolved external symbol 
	"__int64 const  std::_Fpz" 
	(?_Fpz@std@@3_JB)
capture-stats-stl.obj : error LNK2001: unresolved external symbol 
	"private: static class std::locale::_Locimp *  
		std::locale::_Locimp::_Global" 
	(?_Global@_Locimp@locale@std@@0PAV123@A)
capture-stats-stl.obj : error LNK2001: unresolved external symbol 
	"public: static class std::locale::id  std::ctype<char>::id" 
	(?id@?$ctype@D@std@@2V0locale@2@A)
capture-stats-stl.obj : error LNK2001: unresolved external symbol 
	"private: static int  std::locale::id::_Id_cnt" 
	(?_Id_cnt@id@locale@std@@0HA)
capture-stats-stl.obj : error LNK2001: unresolved external symbol 
	"private: static short const * const  std::ctype<char>::_Cltab" 
	(?_Cltab@?$ctype@D@std@@0PBFB)
ethereal.exe : fatal error LNK1120: 5 unresolved externals
NMAKE : fatal error U1077: 'link' : return code '0x460'










If I don't add MSVCPRT.LIB, I instead get the following errors:
string-parser.obj : error LNK2001: unresolved external symbol 
	"void __cdecl std::_Xran(void)" 
	(?_Xran@std@@YAXXZ)
capture-stats-stl.obj : error LNK2001: unresolved external symbol 
	"void __cdecl std::_Xran(void)" 
	(?_Xran@std@@YAXXZ)
string-parser.obj : error LNK2001: unresolved external symbol 
	"void __cdecl std::_Xlen(void)" 
	(?_Xlen@std@@YAXXZ)
capture-stats-stl.obj : error LNK2001: unresolved external symbol 
	"void __cdecl std::_Xlen(void)" 
	(?_Xlen@std@@YAXXZ)
capture-stats-stl.obj : error LNK2001: unresolved external symbol 
	"public: virtual __thiscall std::ios_base::~ios_base(void)" 
	(??1ios_base@std@@UAE@XZ)
capture-stats-stl.obj : error LNK2001: unresolved external symbol 
	"public: void __thiscall std::ios_base::clear(int,bool)" 
	(?clear@ios_base@std@@QAEXH_N@Z)
capture-stats-stl.obj : error LNK2001: unresolved external symbol 
	"__int64 const  std::_Fpz" 
	(?_Fpz@std@@3_JB)
capture-stats-stl.obj : error LNK2001: unresolved external symbol 
	"private: static class std::locale::_Locimp *  
		std::locale::_Locimp::_Global" 
	(?_Global@_Locimp@locale@std@@0PAV123@A)
capture-stats-stl.obj : error LNK2001: unresolved external symbol 
	"private: static class std::locale::_Locimp * 
		__cdecl std::locale::_Init(void)" 
	(?_Init@locale@std@@CAPAV_Locimp@12@XZ)
capture-stats-stl.obj : error LNK2001: unresolved external symbol 
	"struct _iobuf * __cdecl std::__Fiopen(char const *,int)" 
	(?__Fiopen@std@@YAPAU_iobuf@@PBDH@Z)
capture-stats-stl.obj : error LNK2001: unresolved external symbol 
	"protected: void __thiscall std::ios_base::_Addstd(void)" 
	(?_Addstd@ios_base@std@@IAEXXZ)
capture-stats-stl.obj : error LNK2001: unresolved external symbol 
	"protected: void __thiscall std::ios_base::_Init(void)" 
	(?_Init@ios_base@std@@IAEXXZ)
capture-stats-stl.obj : error LNK2001: unresolved external symbol 
	"public: bool __thiscall std::locale::_Iscloc(void)const " 
	(?_Iscloc@locale@std@@QBE_NXZ)
capture-stats-stl.obj : error LNK2001: unresolved external symbol 
	"public: class std::locale::facet const * __thiscall 
		std::locale::_Getfacet(unsigned int,bool)const " 
	(?_Getfacet@locale@std@@QBEPBVfacet@12@I_N@Z)
capture-stats-stl.obj : error LNK2001: unresolved external symbol 
	"public: static class std::locale::id  std::ctype<char>::id" 
	(?id@?$ctype@D@std@@2V0locale@2@A)
capture-stats-stl.obj : error LNK2001: unresolved external symbol 
	"private: static int  std::locale::id::_Id_cnt" 
	(?_Id_cnt@id@locale@std@@0HA)
capture-stats-stl.obj : error LNK2001: unresolved external symbol 
	"private: static short const * const  std::ctype<char>::_Cltab" 
	(?_Cltab@?$ctype@D@std@@0PBFB)
capture-stats-stl.obj : error LNK2001: unresolved external symbol 
	"public: __thiscall std::_Locinfo::~_Locinfo(void)" 
	(??1_Locinfo@std@@QAE@XZ)
capture-stats-stl.obj : error LNK2001: unresolved external symbol 
	"public: __thiscall std::_Locinfo::_Locinfo(char const *)" 
	(??0_Locinfo@std@@QAE@PBD@Z)
capture-stats-stl.obj : error LNK2001: unresolved external symbol 
	__Getctype
capture-stats-stl.obj : error LNK2001: unresolved external symbol 
	__Tolower
capture-stats-stl.obj : error LNK2001: unresolved external symbol 
	__Toupper
capture-stats-stl.obj : error LNK2001: unresolved external symbol 
	"public: class std::locale & __thiscall std::locale::_Addfac
		(class std::locale::facet *,unsigned int,unsigned int)"
	(?_Addfac@locale@std@@QAEAAV12@PAVfacet@12@II@Z)
capture-stats-stl.obj : error LNK2001: unresolved external symbol 
	__Getcvt
ethereal.exe : fatal error LNK1120: 22 unresolved externals
NMAKE : fatal error U1077: 'link' : return code '0x460'
begin:vcard 
n:House;Jason
tel;pager:N/A
tel;cell:N/A
tel;fax:(732) 389-6761
tel;home:(available if needed)
tel;work:(732) 389-6737
x-mozilla-html:FALSE
url:http://www.mitre.org
org:Mitre;W302
adr:;;12 Christopher Way;Eatontown;NJ;07724;USA
version:2.1
email;internet:jhouse@xxxxxxxxx
title:Networking Systems & Distributed Systems Engineer
fn:Jason House
end:vcard