DEV Community

MANOJ AP
MANOJ AP

Posted on • Updated on

GCC erron Golang

On windows you may got the gcc compiler error while trying to add packages like "gorm.io/driver/sqlite" in Golang. The cause for the error is that, underlying package require the gcc C compiler which is not installed on Windows PC by default.

Solution

We need to install the C compiler (gcc) on Windows machine and also need to add the path to environment variable.

The easiest way to install the mingw, is get package from tmd-gcc repository.

Also add the path to the bin folder as follows, in environment variables. (Just type env on start menu and you will get environment variables dialog)

C:\TDM-GCC-64\bin

Read More Golang guides on JSU

Top comments (0)