Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Undefined symbol error for Bcrypt #785

Closed
bhavyajn7599 opened this issue Jun 3, 2024 · 5 comments
Closed

Undefined symbol error for Bcrypt #785

bhavyajn7599 opened this issue Jun 3, 2024 · 5 comments
Labels
build system Build system and script changes

Comments

@bhavyajn7599
Copy link

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
Copy link
Member

nmoinvaz commented Jun 8, 2024

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

@nmoinvaz nmoinvaz added the build system Build system and script changes label Jun 8, 2024
@bhavyajn7599
Copy link
Author

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
Copy link
Author

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

@bhavyajn7599
Copy link
Author

HI Is there any update on this?

@nmoinvaz
Copy link
Member

nmoinvaz commented Jul 4, 2024

I was not able to reproduce your results. Consider upgrading CMake or Visual Studio. Maybe somebody else who has the same issue with come along and solve it. If you find out what is causing it please let me know.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build system Build system and script changes
Projects
None yet
Development

No branches or pull requests

2 participants