0

我得到了很奇怪的错误,我无法理解这些错误实际上是什么意思,当我在Visual Studio中构建项目时,它给了我以下错误,任何人都可以告诉我这些错误实际上是什么意思有一些配置问题,我正在做套接字编程和网络编程。该项目中的图书馆问题

下面是错误的帮你的帮助威尔高度赞赏....

C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppBuild.targets(990,5): warning MSB8012: TargetPath(E:\Study\FWIF\demola\ext-libs\libcommoncpp2-1.6.0\w32\Debug\ccgnu2.dll) does not match the Linker's OutputFile property value (E:\Study\FWIF\demola\ext-libs\libcommoncpp2-1.6.0\w32\Debug\CapeCommon14.dll). This may cause your project to build incorrectly. To correct this, please make sure that $(OutDir), $(TargetName) and $(TargetExt) property values match the value specified in %(Link.OutputFile). 
1>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppBuild.targets(992,5): warning MSB8012: TargetName(ccgnu2) does not match the Linker's OutputFile property value (CapeCommon14). This may cause your project to build incorrectly. To correct this, please make sure that $(OutDir), $(TargetName) and $(TargetExt) property values match the value specified in %(Link.OutputFile). 
1>  Creating library E:\Study\FWIF\demola\ext-libs\libcommoncpp2-1.6.0\w32\Debug\CapeCommon14.lib and object E:\Study\FWIF\demola\ext-libs\libcommoncpp2-1.6.0\w32\Debug\CapeCommon14.exp 
1>socket.obj : error LNK2019: unresolved external symbol "public: bool __thiscall ost::IPV4Cidr::isMember(struct sockaddr const *)const " ([email protected]@[email protected]@[email protected]@@Z) referenced in function "public: bool __thiscall ost::IPV4Cidr::operator==(struct sockaddr const *)const " ([email protected]@@[email protected]@@Z) 
1>in6addr.obj : error LNK2001: unresolved external symbol "public: bool __thiscall ost::IPV4Cidr::isMember(struct sockaddr const *)const " ([email protected]@[email protected]@[email protected]@@Z) 
1>inaddr.obj : error LNK2001: unresolved external symbol "public: bool __thiscall ost::IPV4Cidr::isMember(struct sockaddr const *)const " ([email protected]@[email protected]@[email protected]@@Z) 
1>peer.obj : error LNK2001: unresolved external symbol "public: bool __thiscall ost::IPV4Cidr::isMember(struct sockaddr const *)const " ([email protected]@[email protected]@[email protected]@@Z) 
1>simplesocket.obj : error LNK2001: unresolved external symbol "public: bool __thiscall ost::IPV4Cidr::isMember(struct sockaddr const *)const " ([email protected]@[email protected]@[email protected]@@Z) 
1>socket.obj : error LNK2019: unresolved external symbol "public: bool __thiscall ost::IPV4Cidr::isMember(struct in_addr const &)const " ([email protected]@[email protected]@[email protected]@@Z) referenced in function "public: bool __thiscall ost::IPV4Cidr::operator==(struct in_addr const &)const " ([email protected]@@[email protected]@@Z) 
1>in6addr.obj : error LNK2001: unresolved external symbol "public: bool __thiscall ost::IPV4Cidr::isMember(struct in_addr const &)const " ([email protected]@[email protected]@[email protected]@@Z) 
1>inaddr.obj : error LNK2001: unresolved external symbol "public: bool __thiscall ost::IPV4Cidr::isMember(struct in_addr const &)const " ([email protected]@[email protected]@[email protected]@@Z) 
1>peer.obj : error LNK2001: unresolved external symbol "public: bool __thiscall ost::IPV4Cidr::isMember(struct in_addr const &)const " ([email protected]@[email protected]@[email protected]@@Z) 
1>simplesocket.obj : error LNK2001: unresolved external symbol "public: bool __thiscall ost::IPV4Cidr::isMember(struct in_addr const &)const " ([email protected]@[email protected]@[email protected]@@Z) 
1>E:\Study\FWIF\demola\ext-libs\libcommoncpp2-1.6.0\w32\Debug\CapeCommon14.dll : fatal error LNK1120: 2 unresolved externals 
2>------ Build started: Project: buffer, Configuration: Debug Win32 ------ 
2> buffer.cpp 
2>e:\study\fwif\demola\ext-libs\libcommoncpp2-1.6.0\demo\buffer.cpp(41): fatal error C1083: Cannot open include file: 'cc++/buffer.h': No such file or directory 
========== Build: 0 succeeded, 2 failed, 0 up-to-date, 0 skipped ========== 
+0

我通过选择并点击代码图标(101010)来格式化构建错误。问题中包含的代码也是如此。更容易阅读。 – 2010-12-01 03:33:45

回答

0

对于项目1中的错误,它看起来像你必须将库添加到构建化解功能请致电ost::IPV4Cidr::isMember(struct sockaddr const *)const。可能您正在为您已经包含的库编译错误的调用约定。

对于项目buffer中的编译错误,您需要将该文件cc++/buffer.h的包含路径添加到项目中。