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

fatal error: iconv.h: No such file or directory #42

Closed
sa7mon opened this issue Sep 22, 2020 · 1 comment
Closed

fatal error: iconv.h: No such file or directory #42

sa7mon opened this issue Sep 22, 2020 · 1 comment

Comments

@sa7mon
Copy link

sa7mon commented Sep 22, 2020

It appears I'm having the same problem as #16 which I was disappointed to see just got closed without any replies.

I get this error when attempting to go get on a Windows system:

 go get github.com/djimenez/iconv-go
# github.com/djimenez/iconv-go
C:\Users\<redacted>\go\pkg\mod\github.com\djimenez\iconv-go@v0.0.0-20160305225143-8960e66bd3da\converter.go:8:10: fat
al error: iconv.h: No such file or directory
    8 | #include <iconv.h>
      |          ^~~~~~~~~
compilation terminated.

I see you've noted in the readme that we need to have cgo installed, but I'm looking around it seems like this functionality is built into go itself? Sorry if there is a super obvious fix, but I haven't been able to find one.

Thanks!

@djimenez
Copy link
Owner

iconv.h will be provided either by the development packages of your system or by the iconv compliant library you use - i.e. gnu libiconv. This is why #16 was just closed.

I would suggest using https://godoc.org/golang.org/x/text/encoding if you don't have a very specific reason for wanting to use iconv. It is pure go and maintained.

I answered this before / similarly in #38

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants