Wie openssl/sha.h in C benutzen?
Hallo zusammen.
Ich komme nicht weiter. Ich möchte eine externe Bibliothek benutzen. Die ist auf Github zur verfügung gestellt, allerdings bin ich überfordert weil das Projekt riesig ist.
Hat ein erfahrenerer Entwickler vielleicht ein Tipp für mich wie ich damit arbeiten kann?
Also mir geht es nicht um den Code an sich. Den spuckt mir ChatGPT aus oder ich nehme die Beispiele aus GitHub…
Ich weiß nicht wie ich das ganze zum laufen bekomme…
Vielen Dank für jede hilfreiche Antwort.
If I get you right, you’ll be stuck on the build.
The easiest thing is Linux or MacOS. You can see that you have installed the corresponding OpenSSL packages (means something like “opensl-dev”). Then the headers automatically land where they expect the compiler, and in your case it is enough the compiler flag -lcrypto, which makes the call look like that.
Because this is laborious in the long term, it can be useful to build the project with CMake. Once again a little learning effort, but pays off quickly.
If you’re on Windows, let all hope go…no, it’s not that bad, but you have to worry about the compiler finding the headers and the linker the libraries. I haven’t had to do this for a long time and I can’t say any more details.