alexbrainman / odbc

odbc driver written in go
BSD 3-Clause "New" or "Revised" License
348 stars 139 forks source link

Have error `api/api_unix.go:15:11: fatal error: 'sql.h' file not found` #192

Open tayalone opened 5 months ago

tayalone commented 5 months ago

I got the error api/api_unix.go:15:11: fatal error: 'sql.h' file not found

OS: OS X unixODBC: 2.3.12

Screenshot 2567-01-29 at 16 27 08
alexbrainman commented 5 months ago

This error comes from cgo. If you installed unixODBC libraries, then cgo should be able to find unixODBC sql.h file. Can you build small C program that uses unixODBC package?

Alex

bdgca-wjp commented 6 days ago

You need install unixodbc package. For example, on Ubuntu you would need to do:

sudo apt install unixodbc-dev