hiero-ledger / hiero-sdk-go

Hiero SDK for Go
https://docs.hedera.com/docs/hedera-sdks
Apache License 2.0
110 stars 66 forks source link

No such file or directory #495

Closed Mahmoudgarwallane closed 2 years ago

Mahmoudgarwallane commented 2 years ago

Description

I was following the Environment Set-up in hedera guide I did the steps and then when I executed the code this appeared

# github.com/ethereum/go-ethereum/crypto/secp256k1
cgo-builtin-prolog:1: stddef.h: No such file or directory

I'm running go 1.18

Steps to reproduce

run the code with "github.com/hashgraph/hedera-sdk-go/v2" import and the error will appear

Additional context

No response

Hedera network

testnet

Version

go v1.18 , windows 11

Operating system

Windows

mehcode commented 2 years ago

This looks like an issue with your Go installation. CGO (which several of the dependencies here use) depends on a working GCC installation I believe.

The Go MSI installers should have set everything up for you. But I haven't tried to install Go on Windows for awhile so I might be misremembering some additional steps you need to do.

It looks like you need to setup MingW.

https://github.com/veandco/go-sdl2/issues/328

https://go.dev/doc/install#requirements

In any case, this isn't an issue with the SDK but with Windows and Go. I don't think its possible for us to remove the use of CGO.