1

I have a question related to using hash function available in the libsodium library. https://libsodium.gitbook.io/doc/hashing/generic_hashing

The problem is when I try to use it I get an error message: undefined reference to crypt_generichash()

I am also confused about the installation procedure mentioned in here: https://libsodium.gitbook.io/doc/installation

I just download the folder and place it in my code folder so I guess maybe the error is because of the reason that I didn't follow the configuration because I couldn't understand how to do it. Do I need to go to the path and then execute the commands mentioned like (./configure) but when I do it still gives me an error. As I am a beginner so I do not know how should I do it.

I am using: Contiki (ver 3.0) Language C Ubuntu (16.04)

Fawad Amir
  • 11
  • 3
  • 1
    Possible duplicate of [gcc: undefined reference to](https://stackoverflow.com/questions/22426574/gcc-undefined-reference-to) – hellow Oct 09 '18 at 06:26
  • I could not understand it. How can I compile this library? Do you mean I have to use Contiki compiler to link it? – Fawad Amir Oct 09 '18 at 12:35
  • What is 'Contiki'? It should be very easy for you to use your package manager (`apt` in this case) to install libsodium (`sudo apt install libsodium-dev`) – hellow Oct 09 '18 at 12:39
  • Contiki is OS for IoT. I already tried it and then after including the header files i still get the same error – Fawad Amir Oct 10 '18 at 02:09
  • I also want to add that I have already tried for solving the bash: ./configure: No such file or directory error that occur when I tried to follow the instructions provided at – Fawad Amir Oct 10 '18 at 03:00
  • Have you reviewed this answer? https://stackoverflow.com/questions/26323623/how-to-use-external-libraries-and-compile-them-along-with-a-contiki-application – kfx Oct 11 '18 at 09:31

0 Answers0