VC6.0下的错误信息:

error LNK2001: unresolved external symbol __imp__socket@12 error LNK2001: unresolved external symbol __imp__WSAStartup@8
错误原因:因为没有联接socket库ws2_32.lib。

解决办法:对于VC6.0要在porject/settings的link页面中object/library modules中添ws2_32.lib就可以了;对于Dev-C++同样在工程/工程属性的参数页面中连接器那一栏中添加库,这时必须找到库文件的目录,对于Dev-C++的对应库文件是libws2_32.a,在软件安装下lib文件夹中可以找到相应的库文件。
总结:所有运用到WinSock2的程序在编译连接时都要用的该库
#pragma comment(lib,"ws2_32.lib")
 

error LNK2001: unresolved external symbol __imp__WSAStartup@8 SOCKET(转)的更多相关文章

  1. VC++ : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::basic_string<wchar_t,struct std::char_traits<wchar_t>

    最近学习Google Breakpad,将其用在了自己的项目中,编译的版本为VS2010,没有什么问题.但是为了和之前的程序兼容,需要使用VS2008版本的程序,于是又编译了VS2008版本的代码,但 ...

  2. [异常] VC6.0 error LNK2001: unresolved external symbol _main解决办法

    来自:http://www.douban.com/note/65638800/ 学习VC++时经常会遇到链接错误LNK2001,该错误非常讨厌,因为对于编程者来说,最好改的错误莫过于编译错误,而一般说 ...

  3. VC6.0 error LNK2001: unresolved external symbol _main解决办法

    学习VC++时经常会遇到链接错误LNK2001,该错误非常讨厌,因为对于编程者来说,最好改的错误莫过于编译错误,而一般说来发生连接错误时,编译都已通过.产生连接错误的原因非常多,尤其LNK2001错误 ...

  4. (转载)浅析error LNK2001: unresolved external symbol "public: __thisc...

    学习VC++时经常会遇到链接错误LNK2001,该错误非常讨厌,因为对于      编程者来说,最好改的错误莫过于编译错误,而一般说来发生连接错误时,      编译都已通过.产生连接错误的原因非常多 ...

  5. MASMPlus编译出错:error LNK2001: unresolved external symbol _WinMainCRTStartup

    初学汇编,感觉很多不懂.不过那也是,如果懂了的话就不用学了,从无到有学习一门编程语言果然不是那么容易的一件事. 学习汇编总得要有一款汇编软件才行,没理由只是使用Windows自带的DEBUG.于是上了 ...

  6. error LNK2001: unresolved external symbol _main

    想运行一个网上下载的opengl离屏渲染(渲染到纹理FBO)的程序,然后一直报错 error LNK2001: unresolved external symbol _main 解决了一下午终于弄明白 ...

  7. VC6.0 error LNK2001: unresolved external symbol __imp__ntohl@4

    --------------------Configuration: oxToint1 - Win32 Debug-------------------- Linking... main.obj : ...

  8. 混合编程:error LNK2001: unresolved external symbol

    Vs2006+matlab2010rb环境: 1:工具-选项-项目解决方案-VC++目录设置include和lib的路径 2:项目-属性-属性配置-链接器-输入-附加依赖项把库的名字添加进去 VIST ...

  9. error LNK2001: unresolved external symbol @__security_check_cookie

    Q:VS2005编译的静态库, 在vc++6.0中连接出现错误 error LNK2001: unresolved external symbol @__security_check_cookie@l ...

随机推荐

  1. 配置vim nginx.conf高亮

    #!/bin/bashwget http://www.vim.org/scripts/download_script.php?src_id=14376 -O nginx.vimmv nginx.vim ...

  2. JZOJ 3223. 【HBOI2013】Ede的新背包问题

    3223. [HBOI2013]Ede的新背包问题 (Standard IO) Time Limits: 2000 ms  Memory Limits: 262144 KB  Detailed Lim ...

  3. django-simple-captcha 验证码干扰线随机点位

    CAPTCHA_NOISE_FUNCTIONS = ( 'captcha.helpers.noise_null',# 设置样式 'captcha.helpers.noise_arcs',# 设置干扰线 ...

  4. A1055 The World's Richest(25 分)

    A1055 The World's Richest(25 分) Forbes magazine publishes every year its list of billionaires based ...

  5. OpenCV学习笔记(七) 图像金字塔 阈值 边界

    转自: OpenCV 教程 使用 图像金字塔 进行缩放 图像金字塔是视觉运用中广泛采用的一项技术.一个图像金字塔是一系列图像的集合 - 所有图像来源于同一张原始图像 - 通过梯次向下采样获得,直到达到 ...

  6. Aizu 2560 Point Distance FFT

    题意: 有一个\(N \times N\)的方阵,第\(x\)行第\(y\)列有\(C_{x,y}\)个点\((0 \leq C_{x,y} \leq 9)\). 任选两个不同的点,求两点欧几里德距离 ...

  7. Error:Execution failed for task ':myapplication:processDebugResources'. > com.android.ide.common.pro

    Error:Execution failed for task ':myapplication:processDebugResources'. > com.android.ide.common. ...

  8. Linux QA

    gitee: https://gitee.com/dhclly/icedog.script.test/blob/master/doc/linux/linux-qa.md 1. linux 中的 ll( ...

  9. nsfwjs鉴黄识别最小化案例

    3个月前,也就是2月份左右吧,Github上出现一个开源项目: Infinite Red, Inc.工作室宣布开源旗下基于tensorflow的tfjs的鉴黄小工具 据说是从15000张图片中 进行机 ...

  10. Python数据分析基础——读写CSV文件

    1.基础python代码: #!/usr/bin/env python3 # 可以使脚本在不同的操作系统之间具有可移植性 import sys # 导入python的内置sys模块,使得在命令行中向脚 ...