Under Visual Studio 2005, I am trying to compile a statically linked executable, which will be self-contained at run time, that uses the POCO 1.3.2 libraries.
In preparation, I copied and edited the build_vs80.cmd file to build the debug_static and release_static libraries, like so:
devenv /useenv /rebuild debug_static Foundation_vs80.sln
devenv /useenv /rebuild release_static Foundation_vs80.sln
... etc.
Running this file created the *mt.lib and *mtd.lib files under {poco_root}lib. (E.g., PocoFoundationmtd.lib, PocoNetmtd.lib, etc.)
I added the POCO_STATIC preprocessor definition to my project properties.
I added PocoFoundationmtd.lib, PocoNetmtd.lib, and PocoXMLmtd.lib to my linker inputs.
When I compile, however, I get 30 or so link errors along the lines of:
PocoNetmtd.lib(SocketAddress.obj) : error LNK2019: unresolved external symbol __imp__getservbyname@8 referenced in function "protected: unsigned short __thiscall Poco: :Net: :SocketAddress: :resolveService(class std: :basic_string
PocoNetmtd.lib(IPAddress.obj) : error LNK2019: unresolved external symbol __imp__ntohl@4 referenced in function "public: virtual bool __thiscall Poco: :Net: :IPv4AddressImpl: :isLoopback(void)const " (?isLoopback@IPv4AddressImpl@Net@Poco@@UBE_NXZ)
... etc.
I feel I am missing something basic and obvious, but may I ask anyway, How do I resolve these linking errors?
Thanks.
Sincerely,
Grant Lindsay





