gcc - NaCl XSalso20 C code not compiling -
i trying out xsalsa20 code nacl website. unable compile it.
#include "build/blackdragon/include/x86/crypto_stream.h" #include<stdio.h> int main(){ //const unsigned char m[crypto_stream_xsalsa20; const unsigned char k[crypto_stream_xsalsa20_keybytes] = "1234567890123456789012345678901"; const unsigned char n[crypto_stream_xsalsa20_noncebytes] = "12345678901234567890123"; unsigned char c[51]; unsigned long long len; len = 50; crypto_stream_xsalsa20(c,len,n,k); //printf("%s",m); return 0; } when try compile gcc getting following error message.
/tmp/ccnai8z1.o: in function `main': test.cpp:(.text+0xbc): undefined reference `crypto_stream_xsalsa20_ref' /tmp/ccnai8z1.o:(.eh_frame+0x13): undefined reference `__gxx_personality_v0' collect2:error: ld returned 1 exit status could please me trouble shoot this.
ps: code within nacl folder compiled nacl
i solved installing library system path. easy can use
apt-get install libnacl-dev
Comments
Post a Comment