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

Differences between windows build files #258

Open
mattnappo opened this issue Jul 19, 2018 · 6 comments
Open

Differences between windows build files #258

mattnappo opened this issue Jul 19, 2018 · 6 comments

Comments

@mattnappo
Copy link

This is not an issue, but a question. When building Argon2 on Windows, with Visual Studio, the build folder is created. The build folder has all of the .dll and .lib files. The readme.md file says to compile the test script with this command:
gcc test.c libargon2.a -Isrc -o test
Because I am on Windows, I can not use the libargon2.a file (I think this is correct). So, my question is, which dll file from the Visual Studio build folder should I use instead of libargon2.a? Or should I use a .lib file? My guess is either Argon2RefDll.dll or Argon2OptDll.dll. What is the difference between Ref and Opt? Thanks.

@daniel-dinu
Copy link
Member

daniel-dinu commented Jul 19, 2018

If you look at the source files compiled in Argon2RefDll and Argon2OptDll, you can see that one project uses ref.c and the other uses opt.c. ref corresponds to a portable C implementation, while opt corresponds to an optimized C implementation that uses AVX.

@mattnappo
Copy link
Author

Okay. So both should work when compiling?

@mattnappo
Copy link
Author

mattnappo commented Jul 19, 2018

Because when I use Argon2OptDll.dll or Argon2RefDll.dll with this compile command:
gcc test.c Argon2OptDll.dll -Isrc -o test
I get this error:

undefined reference to `argon2i_hash_raw'
undefined reference to `argon2i_ctx'
undefined reference to `argon2_error_message'

@sneves
Copy link
Contributor

sneves commented Jul 19, 2018

It seems like you are not giving the correct path to the dll? I tried

gcc test.c -I include vs2015\build\Argon2RefDll.dll

and it worked.

@mattnappo
Copy link
Author

what does include do?

@sneves
Copy link
Contributor

sneves commented Jul 19, 2018

include is the directory where argon2.h is. The readme says -Isrc, but that is not correct anymore.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants