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
  • 相关阅读:
    创建对象_原型(Prototype)模式_深拷贝
    创建对象_工厂方法(Factory Method)模式 与 静态工厂方法
    创建对象——单例(Singleton)模式
    模板方法模式
    移除HTML5 input在type="number"时的上下小箭头
    颜色名列表
    什么是盒模型?
    JQuery中$.ajax()方法参数详解
    zsh下docker命令tab补全方法
    ubuntu14.04 搭建gitlab服务
  • 原文地址:https://www.cnblogs.com/java20130722/p/3207160.html
Copyright © 2011-2022 走看看