trezor-crypto | lock Do n't use this repo , use the new monorepo | Cryptography library
kandi X-RAY | trezor-crypto Summary
kandi X-RAY | trezor-crypto Summary
Heavily optimized cryptography algorithms for embedded devices. Distibuted under MIT License.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of trezor-crypto
trezor-crypto Key Features
trezor-crypto Examples and Code Snippets
Community Discussions
Trending Discussions on trezor-crypto
QUESTION
Let's say I want to use mnemonic_generate
function from https://github.com/trezor/trezor-crypto/blob/master/bip39.c in my code (actually I want to use many others from the repository but let's just consider this). I have cloned the repo on my system. I can do make and it works. But I have a separate .c
file in which I have #include"relative/path/to/bip39.c"
And I try to call mnemonic_generate but it throws a lot of errors of the type undefined reference to 'X'
(for example undefined reference to random_buffer
and so on). I understand that this file in turn is trying to include other files which might contain the definitions of these undefined things but they are not getting included for some reason. Why is this happening and how to fix this?
The main reason I was confused was because I didn't know (Well I had studied but wasn't conscious of) the difference between compiling and linking. I also didn't know what a Makefile is and why do we need one. This is how I ended up solving it
...ANSWER
Answered 2019-Nov-16 at 18:19You can't just #include a single .c
file from a complex project like this and expect it to work. Life is not that simple.
Instead, the readme.md
file for this project indicates that it is a library, so you need to link against that library (which you say you've already built) and #include the relevant .h files in your application wherever you want to call functions in the library.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install trezor-crypto
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page