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

compile #13

Open
amykim123456 opened this issue Jun 25, 2021 · 5 comments
Open

compile #13

amykim123456 opened this issue Jun 25, 2021 · 5 comments
Labels

Comments

@amykim123456
Copy link

how do you compile this if I want to use this folder in another project?

@sfluhrer
Copy link
Collaborator

Hmmm, by design, you #include hss.h into your code, and link in hss_lib.a or hss_lib_thread.a into your project. Is this not working? What build environment are you using?

@amykim123456
Copy link
Author

using visual studio

@amykim123456
Copy link
Author

How do I compile this in order to get an executable that I can use?

@sfluhrer
Copy link
Collaborator

sfluhrer commented Jul 1, 2021

I tried it with Visual Studio 2019; I created an empty console project, imported the source files, excluding demo.c (I used test_hss.c as my 'main' program, hence I included all the other test_*.c files as well); it turns out that I needed to turn off OpenSSL support (I didn't have a copy of openssl available for VS, so I just set USE_OPENSSL to 0 in sha256.h); I excluded hss_thread_pthread.c (didn't have Posix support either); there were a few sprintf calls in the test files that I switched to sprintf_s; there were a few "signedness mismatch" warnings I ignored; and finally, as VS didn't give me an easy way to call parameters, I modified test_hss.c to automatically run all tests. With all that, it worked fine for me.

What problem are you running into?

@amykim123456
Copy link
Author

How would I compile in Linux terminal to create exe to be used in another project?

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

No branches or pull requests

2 participants