[libdnet-devel] Linker errors using libnet in Visual Studio .NET
Status: Abandoned
Brought to you by:
dugsong
|
From: Kapil K. <ka...@us...> - 2005-08-04 01:43:11
|
Hi members ..I am trying to use the dnet.lib library in the "libnet dev =
pack" for generating network packets and binidng them to different ip =
addresses on windows platform. I am using Visual Studio .NET on win XP =
but I am facing severe linker errors . i really need your help and hope =
somebody will help me.
=20
I included the dnet header files "dnet.h"in my project and added the =
path of lib file in the library include directory in the project =
settings. I created the main and called one of the function from addr.h=20
int addr_cmp(const struct addr* a , const struct addr* b );
file but it gave the linker error=20
Unresolved external symbol _addr_cmp referenced in _main...
I guessed that the external library dnet.lib is not getting referenced , =
so I added the dnet.lib in the link line . But after doing this I am =
getting several linker errors -=20
test1 error LNK2005: "private: __thiscall type_info::type_info(class =
type_info const &)" (??0type_info@@AAE@ABV0@@Z) already defined in =
LIBCD.lib(typinfo.obj)
test1 error LNK2005: _memmove already defined in LIBCD.lib(memmove.obj)
Found "public: virtual void * __thiscall type_info::`vector =
deleting destructor'(unsigned int)" (??_Etype_info@@UAEPAXI@Z)
Referenced in LIBCD.lib(typinfo.obj)
Loaded MSVCRT.lib(ti_inst.obj)
test1 error LNK2005: _sprintf already defined in LIBCD.lib(sprintf.obj)
Found __imp__strtol
Referenced in dnet.lib(addr.obj)
Referenced in dnet.lib(addr-util.obj)
Loaded MSVCRT.lib(MSVCR70.dll)
test1 error LNK2005: _strtol already defined in LIBCD.lib(strtol.obj)
Found __imp__strchr
Referenced in dnet.lib(addr.obj)
Loaded MSVCRT.lib(MSVCR70.dll)
test1 error LNK2019: unresolved external symbol __imp__gethostbyname@4 =
referenced in function _addr_pton
test1 error LNK2019: unresolved external symbol __imp__htons@4 =
referenced in function _ip6_pton
test1 error LNK2019: unresolved external symbol __imp__ntohs@4 =
referenced in function _ip6_ntop
test1 fatal error LNK1120: 4 unresolved externals
test1 warning LNK4098: defaultlib 'MSVCRT' conflicts with use of other =
libs; use /NODEFAULTLIB:library
=20
I tried addind LIBCD in the nodefault list...but invain.. =20
Please somebody tell me what to do as I am really stuck up on this...
thanks
kapil
=20
=20
=20
=20
=20
|