Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiple definitiions in cli tool #133

Open
isaacvr opened this issue Oct 31, 2019 · 0 comments
Open

Multiple definitiions in cli tool #133

isaacvr opened this issue Oct 31, 2019 · 0 comments
Labels
bug Something isn't working

Comments

@isaacvr
Copy link

isaacvr commented Oct 31, 2019

Describe the bug
When using Skywallet go package and Ledger package simultaneously(as in case of cli tool), while linking time are raising errors for multiple definitions.

Environment information:

  • OS: Linux
  • Platform: any
  • Firmware Version: any

Steps to Reproduce
Steps to reproduce the behavior:

  1. Go to cmd/cli
  2. Run go run cli.go
  3. See error

Actual behavior
For Linux to communicate with HID is using libusb, but for Skywallet it is modified by Trezor devs, so for Ledger is using another go lib, which uses libusb in hidapi, as one whole lib, but not two independent. So *.c files for Skywallet and Ledger implementation is included twice.

Expected behavior
Compiling successful

Possible implementation
Headers are usually wrapped in

#ifndef ...
#define ...
Some code...
#endif 

So making the same for *.c files could have helped, but it was problem with using define directive in go code (didn't understand how to use it for now)

@isaacvr isaacvr added the bug Something isn't working label Oct 31, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant