zoukankan      html  css  js  c++  java
  • error LNK2001:unresolved external symbol __imp__@ 解决方法

    我在程序Lan中使用了winsock函数,出现如下错误:
    Lan.obj:error   LNK2001:   unresolved   external   symbol   __imp__listen@8 
    Lan.obj   :   error   LNK2001:   unresolved   external   symbol   __imp__bind@12 
    Lan.obj   :   error   LNK2001:   unresolved   external   symbol   __imp__setsockopt@20 
    Lan.obj   :   error   LNK2001:   unresolved   external   symbol   __imp__htons@4 
    Lan.obj   :   error   LNK2001:   unresolved   external   symbol   __imp__WSAAsyncSelect@16 
    Lan.obj   :   error   LNK2001:   unresolved   external   symbol   __imp__socket@12 
    Lan.obj   :   error   LNK2001:   unresolved   external   symbol   __imp__connect@12 
    Lan.obj   :   error   LNK2001:   unresolved   external   symbol   __imp__gethostbyname@4 
    Lan.obj   :   error   LNK2001:   unresolved   external   symbol   __imp__inet_addr@4 
    Lan.obj   :   error   LNK2001:   unresolved   external   symbol   __imp__accept@12 
    Lan.obj   :   error   LNK2001:   unresolved   external   symbol   __imp__gethostname@8 
    Lan.obj   :   error   LNK2001:   unresolved   external   symbol   __imp__closesocket@4 
    Debug/Transport.exe   :   fatal   error   LNK1120:   12   unresolved   externals 
    Error   executing   link.exe.

    解决方法:
    [Project-> Setting]-> [Link-> Object/Library   modules]加入wsock32.lib
  • 相关阅读:
    原码、反码、补码,计算机中负数的表示
    java 解惑系列
    (转载) 深入JVM学习笔记-安全性
    理解Java对象序列化
    关于Arrays.asList 函数的一些 陷阱
    JAVA设计模式之单例模式 (转载)
    Educational Codeforces Round 76 D
    总结
    bzoj3531: [Sdoi2014]旅行 (树链剖分 && 动态开点线段树)
    bzoj3626: [LNOI2014]LCA (树链剖分)
  • 原文地址:https://www.cnblogs.com/java20130722/p/3207160.html
Copyright © 2011-2022 走看看