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
  • 相关阅读:
    Python基础:内置函数
    Python基础:获取平台相关信息
    Python生成器-博文读后感
    IP地址、域名、域名解析系统相关
    Flask:初次使用Flask-SQLAlchemy读取SQLite3
    Flask:初次使用Blueprints
    Flask:使用Eclipse+PyDev插件编辑基于package的项目
    Flask:操作SQLite3(0.1)
    SQLite数据库初步
    Flask:redirect()函数
  • 原文地址:https://www.cnblogs.com/java20130722/p/3207160.html
Copyright © 2011-2022 走看看