代码改变世界

随笔档案-2012年5月6日

C++编程获得某台机器的IP地址

2012-05-06 15:55 by java20130722, 250 阅读, 收藏,
摘要: 转自:http://www.vckbase.com/document/viewdoc/?id=435下面是程序的代码,很简单://////////////////////////////////////////////////////////////// // // 本程序报告本机上每一块网卡的IP地址 // 命令行编译命令为: // // cl getip1.cpp wsock32.lib // // 请一定要在环境变量中正确指定LIB库的路径;可以运行vcvars32.bat // #include #include #include #include int main() { ... 阅读全文

error LNK2001:unresolved external symbol __imp__@ 解决方法

2012-05-06 15:06 by java20130722, 1420 阅读, 收藏,
摘要: 我在程序Lan中使用了winsock函数,出现如下错误:Lan.obj:error LNK2001: unresolved external symbol __imp__listen@8Lan.obj : error LNK2001: unresolved external symbol __imp__bind@12Lan.obj : error LNK2001: unresolved external symbol __imp__setsockopt@20Lan.obj : error LNK2001: unresolved external ... 阅读全文