0
votes

I try to compile VC++ application and get the error message as below. Is there anyone who know what the library I may be missing? Any advice & suggestion are appreciated.

My Environment:

  1. VC++ 2010
  2. zlib-1.2.8
  3. boost_1_57_0
  4. icu
1>------ Build started: Project: paloserver, Configuration: Debug Win32 ------
1>     Creating library C:/Users/a992788/Virtual Machines/Documents/Application/Palo/Palo 3.x Source Code/palo-code-546/molap/server/5.1/SourceCode/Debug/paloserver.lib and object C:/Users/a992788/Virtual Machines/Documents/Application/Palo/Palo 3.x Source Code/palo-code-546/molap/server/5.1/SourceCode/Debug/paloserver.exp

1>unzip.obj : error LNK2019: unresolved external symbol _inflateInit2_ referenced in function _unzOpenCurrentFile3

1>unzip.obj : error LNK2019: unresolved external symbol _inflate referenced in function _unzReadCurrentFile

1>unzip.obj : error LNK2019: unresolved external symbol _crc32 referenced in function _unzReadCurrentFile

1>zip.obj : error LNK2001: unresolved external symbol _crc32

1>unzip.obj : error LNK2019: unresolved external symbol _inflateEnd referenced in function _unzCloseCurrentFile

1>zip.obj : error LNK2019: unresolved external symbol _get_crc_table referenced in function _zipOpenNewFileInZip4_64

1>zip.obj : error LNK2019: unresolved external symbol _deflateInit2_ referenced in function _zipOpenNewFileInZip4_64

1>zip.obj : error LNK2019: unresolved external symbol _deflate referenced in function _zipWriteInFileInZip

1>zip.obj : error LNK2019: unresolved external symbol _deflateEnd referenced in function _zipCloseFileInZipRaw64

1>C:\Users\a992788\Virtual Machines\Documents\Application\Palo\Palo 3.x Source Code\palo-code-546\molap\server\5.1\SourceCode\Debug\paloserver.dll : fatal error LNK1120: 8 unresolved externals
1
zlib-1.2.8's file or library is missing. Check tutorial on how to use zlib properly in MSVC. - Mohit Jain
Hi Mohit, should I compile the libz by myself or? it doesn't work even if I add "zdll.lib" into VC library and copy "zlib1.dll" into system32. - Dean Division
There should be an option to add "Additional library files" or add all zlib files into your project. - Mohit Jain
Yes, it works fine now. Thanks! - Dean Division

1 Answers

0
votes

Add reference to the zdll.lib in your source.

#pragma comment (lib, "zdll.lib")