当前位置:网站首页>Zlib static library compilation
Zlib static library compilation
2022-06-26 08:28:00 【Tonyfield】
Use... In projects minizip and zlib Static library , zlib use 1.2.11 edition (https://github.com/madler/zlib/archive/v1.2.11.zip) compile .
The errors reported after importing are as follows .
1>minizip.lib(mz_crypt.obj) : error LNK2019: Unresolved external symbols _crc32, The sign is in the function _mz_crypt_crc32_update Cited in
1>minizip.lib(mz_strm_zlib.obj) : error LNK2019: Unresolved external symbols _deflate, The sign is in the function _mz_stream_zlib_deflate Cited in
1>minizip.lib(mz_strm_zlib.obj) : error LNK2019: Unresolved external symbols _deflateEnd, The sign is in the function _mz_stream_zlib_close Cited in
1>minizip.lib(mz_strm_zlib.obj) : error LNK2019: Unresolved external symbols _inflate, The sign is in the function _mz_stream_zlib_read Cited in
1>minizip.lib(mz_strm_zlib.obj) : error LNK2019: Unresolved external symbols _inflateEnd, The sign is in the function _mz_stream_zlib_close Cited in
1>minizip.lib(mz_strm_zlib.obj) : error LNK2019: Unresolved external symbols _deflateInit2_, The sign is in the function _mz_stream_zlib_open Cited in
1>minizip.lib(mz_strm_zlib.obj) : error LNK2019: Unresolved external symbols _inflateInit2_, The sign is in the function _mz_stream_zlib_open Cited in But it's compiled from the Internet zlib1.2.5 or 1.2.8 No problem . So I began to doubt ZEXPORT Definition .
zconf.h in ZEXPORT There is a comment on the definition :“use WINAPI, not __stdcall”.
/* No need for _export, use ZLIB.DEF instead. */
/* For complete Windows compatibility, use WINAPI, not __stdcall. */
# define ZEXPORT WINAPIBut in minwindef.h in WINAPI Defined as __stdcall , Seemingly expected and MSV Different definitions .
#elif (_MSC_VER >= 800) || defined(_STDCALL_SUPPORTED)
#define CALLBACK __stdcall
#define WINAPI __stdcall
#define WINAPIV __cdecl
#define APIENTRY WINAPI
#define APIPRIVATE __stdcall
#define PASCAL __stdcallSo it is defined as follows , Recompile the static library . After importing the project, the compilation succeeded .
# ifdef ZLIB_INTERNAL
# define ZEXPORT WINAPIV
# else
# define ZEXPORT WINAPI
# endifBut this causes dynamic library compilation errors , So add another judgment condition ( _WINDLL)
# if !defined _WINDLL && defined ZLIB_INTERNAL
# define ZEXPORT WINAPIV
# else
# define ZEXPORT WINAPI
# endifperiod , There are also some small mistakes :
SAFESEH The image is not secure
resolvent :https://blog.csdn.net/zengraoli/article/details/11919307
1. Open the “ Property page ” Dialog box .
2. single click “ The linker ” Folder .
3. single click “ Command line ” Property page .
4. take /SAFESEH:NO type “ Additional options ” In the box , And then click “ application ”.
bld_ml64.bat Call failed
Tried Microsoft Macro Assembler 8.0 (MASM) Package (x86), It doesn't work
It needs to be copied contribute In the catalog masm64 To the parent directory
边栏推荐
- JS precompile - Variable - scope - closure
- drf的相关知识
- Can the encrypted JS code and variable name be cracked and restored?
- MySQL practice: 2 Table definition and SQL classification
- How to Use Instruments in Xcode
- 2020-10-17
- Go language shallow copy and deep copy
- FFmpeg音视频播放器实现
- CodeBlocks集成Objective-C开发
- . eslintrc. JS configuration
猜你喜欢

RF filter

STM32 project design: smart door lock PCB and source code based on stm32f1 (4 unlocking methods)
![[postgraduate entrance examination] group planning: interrupted](/img/ec/1f3dc0ac22e3a80d721303864d2337.jpg)
[postgraduate entrance examination] group planning: interrupted

Uni app installation and project directory (hbuilder configuration)

Read excel table and render with FileReader object

Oracle database self study notes

Recognize the interruption of 80s51

Opencv learning notes II

Ora-12514: tns: the listener currently does not recognize the service requested in the connection descriptor

Introduction of laser drive circuit
随机推荐
How to Use Instruments in Xcode
Mapping '/var/mobile/Library/Caches/com. apple. keyboards/images/tmp. gcyBAl37' failed: 'Invalid argume
Relationship extraction -- casrel
Why are you impetuous
Use a switch to control the lighting and extinguishing of LEP lamp
监听iPad键盘显示和隐藏事件
MySQL practice: 4 Operation of data
Timer code guide in optee
Database learning notes II
2020-10-20
Interpretation of x-vlm multimodal model
Example of offset voltage of operational amplifier
Getting started with idea
Idea update
Leetcode22 summary of types of questions brushing in 2002 (XII) and collection search
Relevant knowledge of DRF
Installation of jupyter
Introduction of laser drive circuit
(3) Dynamic digital tube
在 KubeSphere 部署 Wiki 系统 wiki.js 并启用中文全文检索