Skip to content

Multiple definitiions in cli tool #133

@isaacvr

Description

@isaacvr

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions