zlib-ng / minizip-ng

Fork of the popular zip manipulation library found in the zlib distribution.
Other
1.2k stars 425 forks source link

Undefined symbol error for Bcrypt #785

Open bhavyajn7599 opened 1 month ago

bhavyajn7599 commented 1 month ago

I am trying to compile Minizip for Windows platform and after compilation I am using libminizip.lib in my project unresolved external symbol error for all bcrypt APIs

Bcrypt Then i ran dumpbin /SYMBOLS libminizip.lib this command for checking all the symbols and i saw that these symbols are all undefined. image This is the command I am using for compiling Minizip project I am using version 4.0.4

cmake -S . -B build -D MZ_BUILD_TESTS=ON -DZSTD_TAG=dev -D MZ_DECOMPRESS_ONLY=ON -D MZ_FORCE_FETCH_LIBS=ON -D MZ_FILE32_API=ON -D MZ_COMPRESS_ONLY=ON -D MZ_SIGNING=ON -D MZ_LIBBSD=ON -D MZ_BUILD_UNIT_TESTS=ON -D MZ_CODE_COVERAGE=ON -D MZ_ICONV=ON -DZLIB_TAG=develop -D MZ_LIBCOMP=ON -D MZ_OPENSSL=ON -DCMAKE_WINDOWS_EXPORT_ALL_SYMBOLS=ON Build_log.txt This the log of build. Can you check why these API's are not getting defined. I tried compiling with minizip 3.0.10 and in that I am not facing any errors as I can see that mz_crypt_winvista.c file was added after 3.0.10 . Can you check if that file has some issue. Or am i missing something?

nmoinvaz commented 3 weeks ago

Is it not linked with bcrypt.lib? Please include all build logs.

bhavyajn7599 commented 2 weeks ago

It is mentioned in script to link bcrypt here cmake And while compiling also i can see it is finding BCryptGenRandom as attched in the picture below but still it is giving errrors for bcrypt functions present in mz_crypt_winvista.c I am facing same issue with Minizip 4.0.7 also. Version 3.0.10 is the last version with which I am not getting this error. cmd

bhavyajn7599 commented 2 weeks ago

Build with 4.0.7.txt Please find attached the text file for complete build log