An error occurs when connecting to sqlite3: go-sqlite3 requires cgo to work. This is a stub
Error message:
register db Ping default, Binary was compiled with 'CGO_ENABLED=0', go-sqlite3 requires cgo to work. This is a stub
Windows solution
- Create new environment variables
- A new error occurs
Error message:
Failed to build the application: # runtime/cgo
cgo: C compiler “ gcc ” not found: exec: “gcc”: executable file not found in %PATH%
- Install GCC
3.1 Enter Sqlite3 official website:https://github.com/mattn/go-sqlite3
3.2 Find the Windows section
3.2 Click the download link
3.3 Download one according to your preference
3.4 Installation