techschool / simplebank

Backend master class: build a simple bank service in Go
MIT License
5.18k stars 939 forks source link

I encountered a problem when using sqlc #106

Closed HzTTT closed 11 months ago

HzTTT commented 11 months ago

I run sqlc generate it encounter a error.

截屏2023-10-17 22 59 02

My CGO_ENABLED has long been set to 1, but sqlc still cannot run. And i test my cgo ,it can run.

截屏2023-10-17 22 58 07

Here are the environment variables for my go and I use macos13.0

截屏2023-10-17 22 57 00

I've tried my best to fix it but still nothing works, hope someone can help me, I would be grateful

HzTTT commented 11 months ago

Because I downloaded it using go install commend.This results in an error, which has been pointed out here https://github.com/sqlc-dev/sqlc/issues/2149 The only useful way to solve is download by homebrew