编译UltraVNC时的Debug版本时遇到vncclient.obj : error LNK2019: unresolved external symbol _compress等错误
来源:互联网 发布:淘宝头条一篇多少钱 编辑:程序博客网 时间:2024/05/29 23:45
当在Debug版本时编译UltraVNC 1.0.9.6.1版本的winvnc源码时会遇到如下错误
1>------ Build started: Project: winvnc, Configuration: Debug Win32 ------
1>Performing Pre-Link Event...
1>buildtime.cpp
1>Linking...
1>vncclient.obj : error LNK2019: unresolved external symbol _compress referenced in function "protected: int __thiscall vncClient::SendCacheZip(class std::vector<struct rfb::Rect,class std::allocator<struct rfb::Rect> > const &)" (?SendCacheZip@vncClient@@IAEHABV?$vector@URect@rfb@@V?$allocator@URect@rfb@@@std@@@std@@@Z)
1>vncEncodeZlib.obj : error LNK2001: unresolved external symbol _compress
1>vncclient.obj : error LNK2019: unresolved external symbol _adler32 referenced in function "public: int __thiscall vncClient::GenerateFileChecksums(void *,char *,int)" (?GenerateFileChecksums@vncClient@@QAEHPAXPADH@Z)
1>vncclient.obj : error LNK2019: unresolved external symbol _uncompress referenced in function "public: bool __thiscall vncClient::ReceiveFileChunk(int,int)" (?ReceiveFileChunk@vncClient@@QAE_NHH@Z)
1>vncEncodeTight.obj : error LNK2019: unresolved external symbol _deflateEnd referenced in function "public: virtual __thiscall vncEncodeTight::~vncEncodeTight(void)" (??1vncEncodeTight@@UAE@XZ)
1>vncEncodeZlib.obj : error LNK2001: unresolved external symbol _deflateEnd
1>vncEncodeZlibHex.obj : error LNK2001: unresolved external symbol _deflateEnd
1>rdr.lib(ZlibOutStream.obj) : error LNK2001: unresolved external symbol _deflateEnd
1>vncEncodeTight.obj : error LNK2019: unresolved external symbol _deflate referenced in function "protected: int __thiscall vncEncodeTight::CompressData(unsigned char *,int,int,int,int)" (?CompressData@vncEncodeTight@@IAEHPAEHHHH@Z)
1>vncEncodeZlib.obj : error LNK2001: unresolved external symbol _deflate
1>vncEncodeZlibHex.obj : error LNK2001: unresolved external symbol _deflate
1>rdr.lib(ZlibOutStream.obj) : error LNK2001: unresolved external symbol _deflate
1>vncEncodeTight.obj : error LNK2019: unresolved external symbol _deflateParams referenced in function "protected: int __thiscall vncEncodeTight::CompressData(unsigned char *,int,int,int,int)" (?CompressData@vncEncodeTight@@IAEHPAEHHHH@Z)
1>vncEncodeTight.obj : error LNK2019: unresolved external symbol _deflateInit2_ referenced in function "protected: int __thiscall vncEncodeTight::CompressData(unsigned char *,int,int,int,int)" (?CompressData@vncEncodeTight@@IAEHPAEHHHH@Z)
1>vncEncodeZlib.obj : error LNK2001: unresolved external symbol _deflateInit2_
1>vncEncodeZlibHex.obj : error LNK2001: unresolved external symbol _deflateInit2_
1>rdr.lib(ZlibInStream.obj) : error LNK2019: unresolved external symbol _inflateInit_ referenced in function "public: __thiscall rdr::ZlibInStream::ZlibInStream(int)" (??0ZlibInStream@rdr@@QAE@H@Z)
1>rdr.lib(ZlibInStream.obj) : error LNK2019: unresolved external symbol _inflateEnd referenced in function "public: virtual __thiscall rdr::ZlibInStream::~ZlibInStream(void)" (??1ZlibInStream@rdr@@UAE@XZ)
1>rdr.lib(ZlibInStream.obj) : error LNK2019: unresolved external symbol _inflate referenced in function "private: void __thiscall rdr::ZlibInStream::decompress(void)" (?decompress@ZlibInStream@rdr@@AAEXXZ)
1>rdr.lib(ZlibOutStream.obj) : error LNK2019: unresolved external symbol _deflateInit_ referenced in function "public: __thiscall rdr::ZlibOutStream::ZlibOutStream(class rdr::OutStream *,int,int)" (??0ZlibOutStream@rdr@@QAE@PAVOutStream@1@HH@Z)
1>.\..\Debug/winvnc.exe : fatal error LNK1120: 11 unresolved externals
1>Build log was saved at "file://e:\工作\UltraVNC_1.0.9.6.1 (1)\UltraVNC\winvnc\Debug\BuildLog.htm"
1>winvnc - 21 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
遇到这情况时修改一下zlibstat项目的属性->Configuration Properties->C/C++->Preprocessor->Preprocessor Definitions里面的ZLIB_WINAPI去掉
当在Debug版本时编译UltraVNC 1.0.9.6.1版本的vncviewer源码时会遇到如下错误
1>------ Build started: Project: vncviewer, Configuration: Debug Win32 ------
1>Setting build time...
1>buildtime.cpp
1>Linking...
1>ClientConnectionTight.obj : error LNK2019: unresolved external symbol _jpeg_finish_decompress referenced in function "private: void __thiscall ClientConnection::DecompressJpegRect(int,int,int,int)" (?DecompressJpegRect@ClientConnection@@AAEXHHHH@Z)
1>ClientConnectionUltra2.obj : error LNK2001: unresolved external symbol _jpeg_finish_decompress
1>ClientConnectionTight.obj : error LNK2019: unresolved external symbol _jpeg_read_scanlines referenced in function "private: void __thiscall ClientConnection::DecompressJpegRect(int,int,int,int)" (?DecompressJpegRect@ClientConnection@@AAEXHHHH@Z)
1>ClientConnectionUltra2.obj : error LNK2001: unresolved external symbol _jpeg_read_scanlines
1>ClientConnectionTight.obj : error LNK2019: unresolved external symbol _jpeg_destroy_decompress referenced in function "private: void __thiscall ClientConnection::DecompressJpegRect(int,int,int,int)" (?DecompressJpegRect@ClientConnection@@AAEXHHHH@Z)
1>ClientConnectionUltra2.obj : error LNK2001: unresolved external symbol _jpeg_destroy_decompress
1>ClientConnectionTight.obj : error LNK2019: unresolved external symbol _jpeg_start_decompress referenced in function "private: void __thiscall ClientConnection::DecompressJpegRect(int,int,int,int)" (?DecompressJpegRect@ClientConnection@@AAEXHHHH@Z)
1>ClientConnectionUltra2.obj : error LNK2001: unresolved external symbol _jpeg_start_decompress
1>ClientConnectionTight.obj : error LNK2019: unresolved external symbol _jpeg_read_header referenced in function "private: void __thiscall ClientConnection::DecompressJpegRect(int,int,int,int)" (?DecompressJpegRect@ClientConnection@@AAEXHHHH@Z)
1>ClientConnectionUltra2.obj : error LNK2001: unresolved external symbol _jpeg_read_header
1>ClientConnectionTight.obj : error LNK2019: unresolved external symbol _jpeg_CreateDecompress referenced in function "private: void __thiscall ClientConnection::DecompressJpegRect(int,int,int,int)" (?DecompressJpegRect@ClientConnection@@AAEXHHHH@Z)
1>ClientConnectionUltra2.obj : error LNK2001: unresolved external symbol _jpeg_CreateDecompress
1>ClientConnectionTight.obj : error LNK2019: unresolved external symbol _jpeg_std_error referenced in function "private: void __thiscall ClientConnection::DecompressJpegRect(int,int,int,int)" (?DecompressJpegRect@ClientConnection@@AAEXHHHH@Z)
1>ClientConnectionUltra2.obj : error LNK2001: unresolved external symbol _jpeg_std_error
1>ClientConnectionTight.obj : error LNK2019: unresolved external symbol _jpeg_resync_to_restart referenced in function "void __cdecl JpegSetSrcManager(struct jpeg_decompress_struct *,char *,int)" (?JpegSetSrcManager@@YAXPAUjpeg_decompress_struct@@PADH@Z)
1>ClientConnectionUltra2.obj : error LNK2001: unresolved external symbol _jpeg_resync_to_restart
1>.\Debug/vncviewer.exe : fatal error LNK1120: 8 unresolved externals
这时可以用编译libjpeg-turbo-win工程中的DebugLib-Static版本,然后从DebugLib-Static文件夹中将libjpeg-turbo-win-static-d.lib库复制到x64\DebugDll-Static文件夹中,然后修改libjpeg-turbo-win-static-d.lib的文件名为jpeg-turbo-win-static-d.lib。
或者在vncviewer的项目属性->Linker->Command Line->Additional options中如果是Rlease版本就添加"ReleaseLib-Static\libjpeg-turbo-win-static.lib",如果是Debug版本就添加"DebugLib-Static\libjpeg-turbo-win-static-d.lib"
- 编译UltraVNC时的Debug版本时遇到vncclient.obj : error LNK2019: unresolved external symbol _compress等错误
- xx.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) 错误
- VS 编译时出现 error LNK2019: unresolved external symbol
- Qt 编译时出现“-1: error: LNK2019: unresolved external symbol "public: void __thiscall M”错误
- vs2008编译时出现问题解决方法:MSVCRTD.lib(crtexew.obj) : error LNK2019: unresolved external symbol _WinMain@16
- vs2008编译时出现问题解决方法:MSVCRTD.lib(crtexew.obj) : error LNK2019: unresolved external symbol _WinMain@16 r
- vs 2005链接时错误的解决方案 error LNK2019: unresolved external symbol __security_cookie referenced in function
- vs 2005链接时错误的解决方案 error LNK2019: unresolved external symbol __security_cookie referenced in function
- error LNK2019: unresolved external symbol 错误处理
- error LNK2019: unresolved external symbol错误,解决
- 关于error LNK2019: unresolved external symbol错误
- error LNK2019: unresolved external symbol错误 (ICU4C)
- 关于error LNK2019: unresolved external symbol错误
- error LNK2019: unresolved external symbol "public 错误的出现原因.
- error LNK2019: unresolved external symbol "public 错误的出现原因. .
- error LNK2019: unresolved external symbol _IID_IMPEG2PIDMap连接错误的解决
- 编译时遇到error LNK2001: unresolved external symbol "private: static
- 解决windows mobile下的编译错误error LNK2019: unresolved external symbol
- 【转】maven 设置http代理
- Excel与OWC做报表总结
- visual stutio 系列开发工具怎样安装和部署应用程序
- Ubuntu系统适合本人的自定义配置
- 补码和数的转换(unsigned/char|int)
- 编译UltraVNC时的Debug版本时遇到vncclient.obj : error LNK2019: unresolved external symbol _compress等错误
- gtk编程笔记 2
- IP、ICMP、UDP、TCP 校验和算法
- javascript通过url向jsp页面传递中文参数导致乱码解决方案
- 怎样把QString转换为char *或者相反?
- SpeedButton使用技巧
- Asterisk拨号方案语法基础
- JavaScript学习笔记1—变量和数据类型
- 修改Oracle最大连接数