Compiling issue
Trying to load onto an arduino uno. IDE is up to date, most rectent version of Duino-coin but getting following error message.
Arduino: 1.8.15 (Windows 10), Board: "Arduino Uno"
sha1.cpp:21:6: error: 'Sha1Wrapper' has not been declared
void Sha1Wrapper::init(void)
^~~~~~~~~~~
C:\Duino\Arduino_Code\sha1.cpp: In function 'void init()':
sha1.cpp:23:20: error: '_hasher' was not declared in this scope
sha1_hasher_init(&_hasher);
^~~~~~~
C:\Duino\Arduino_Code\sha1.cpp: At global scope:
sha1.cpp:27:6: error: 'Sha1Wrapper' has not been declared
void Sha1Wrapper::initHmac(const uint8_t * secret, unsigned int secretLength)
^~~~~~~~~~~
C:\Duino\Arduino_Code\sha1.cpp: In function 'void initHmac(const uint8_t*, unsigned int)':
sha1.cpp:29:25: error: '_hasher' was not declared in this scope
sha1_hasher_init_hmac(&_hasher, secret, secretLength);
^~~~~~~
C:\Duino\Arduino_Code\sha1.cpp: At global scope:
sha1.cpp:32:11: error: 'Sha1Wrapper' has not been declared
uint8_t * Sha1Wrapper::resultHmac(void)
^~~~~~~~~~~
C:\Duino\Arduino_Code\sha1.cpp: In function 'uint8_t* resultHmac()':
sha1.cpp:34:30: error: '_hasher' was not declared in this scope
return sha1_hasher_gethmac(&_hasher);
^~~~~~~
C:\Duino\Arduino_Code\sha1.cpp: At global scope:
sha1.cpp:39:8: error: 'Sha1Wrapper' has not been declared
size_t Sha1Wrapper::write(uint8_t byte)
^~~~~~~~~~~
C:\Duino\Arduino_Code\sha1.cpp: In function 'size_t write(uint8_t)':
sha1.cpp:41:23: error: '_hasher' was not declared in this scope
if(sha1_hasher_putc(&_hasher, byte) == byte)
^~~~~~~
C:\Duino\Arduino_Code\sha1.cpp: At global scope:
sha1.cpp:48:11: error: 'Sha1Wrapper' has not been declared
uint8_t * Sha1Wrapper::result(void)
^~~~~~~~~~~
C:\Duino\Arduino_Code\sha1.cpp: In function 'uint8_t* result()':
sha1.cpp:50:30: error: '_hasher' was not declared in this scope
return sha1_hasher_gethash(&_hasher);
^~~~~~~
C:\Duino\Arduino_Code\sha1.cpp: At global scope:
sha1.cpp:53:1: error: 'Sha1Wrapper' does not name a type
Sha1Wrapper Sha1;
^~~~~~~~~~~
C:\Duino\Arduino_Code\Arduino_Code.ino: In function 'int ducos1a(String, String, int)':
Arduino_Code:65:5: error: 'Sha1' was not declared in this scope
Sha1.init();
^~~~
C:\Duino\Arduino_Code\Arduino_Code.ino:65:5: note: suggested alternative: 'SPR1'
Sha1.init();
^~~~
SPR1
exit status 1
'Sha1Wrapper' has not been declared
This report would have more information with "Show verbose output during compilation" option enabled in File -> Preferences.
Do you have the sha1 files in the same directory as Arduino_code.ino?
Yeah all there. They appear in the ide also along the top.
Can you check the compilation on Arduino IDE 1.8.13?
2 mins, Thank you, Apricate the help
Same issue
sha1.cpp:21:6: error: 'Sha1Wrapper' has not been declared void Sha1Wrapper::init(void) ^~~~~~~~~~~ sketch\sha1.cpp: In function 'void init()': sha1.cpp:23:20: error: '_hasher' was not declared in this scope sha1_hasher_init(&_hasher); ^~~~~~~ sketch\sha1.cpp: At global scope: sha1.cpp:27:6: error: 'Sha1Wrapper' has not been declared void Sha1Wrapper::initHmac(const uint8_t * secret, unsigned int secretLength) ^~~~~~~~~~~ sketch\sha1.cpp: In function 'void initHmac(const uint8_t*, unsigned int)': sha1.cpp:29:25: error: '_hasher' was not declared in this scope sha1_hasher_init_hmac(&_hasher, secret, secretLength); ^~~~~~~ sketch\sha1.cpp: At global scope: sha1.cpp:32:11: error: 'Sha1Wrapper' has not been declared uint8_t * Sha1Wrapper::resultHmac(void) ^~~~~~~~~~~ sketch\sha1.cpp: In function 'uint8_t* resultHmac()': sha1.cpp:34:30: error: '_hasher' was not declared in this scope return sha1_hasher_gethmac(&_hasher); ^~~~~~~ sketch\sha1.cpp: At global scope: sha1.cpp:39:8: error: 'Sha1Wrapper' has not been declared size_t Sha1Wrapper::write(uint8_t byte) ^~~~~~~~~~~ sketch\sha1.cpp: In function 'size_t write(uint8_t)': sha1.cpp:41:23: error: '_hasher' was not declared in this scope if(sha1_hasher_putc(&_hasher, byte) == byte) ^~~~~~~ sketch\sha1.cpp: At global scope: sha1.cpp:48:11: error: 'Sha1Wrapper' has not been declared uint8_t * Sha1Wrapper::result(void) ^~~~~~~~~~~ sketch\sha1.cpp: In function 'uint8_t* result()': sha1.cpp:50:30: error: '_hasher' was not declared in this scope return sha1_hasher_gethash(&_hasher); ^~~~~~~ sketch\sha1.cpp: At global scope: sha1.cpp:53:1: error: 'Sha1Wrapper' does not name a type Sha1Wrapper Sha1; ^~~~~~~~~~~ C:\Duino\Arduino_Code\Arduino_Code.ino: In function 'int ducos1a(String, String, int)': Arduino_Code:65:5: error: 'Sha1' was not declared in this scope Sha1.init(); ^~~~ C:\Duino\Arduino_Code\Arduino_Code.ino:65:5: note: suggested alternative: 'SPR1' Sha1.init(); ^~~~ SPR1 exit status 1 'Sha1Wrapper' has not been declared
Do you have any other sha libraries that may interfere with our one?
Try installing the cryptosuite library maybe. https://daknuett.github.io/cryptosuite2/readme.html#install Not sure if that's gonna solve it but it's worth a try
I didnt, but have just tried cryptosuite... no luck either
Ive now removed cryptosuite again
I just pulled the code from github and it compiled w/o issue. I suspect you've got a library collision or something going on.
Fixed it.