Background of the problem
When compiling the pipe of go in windows, because the pipe depends on SQLite, it needs to be compiled through CGO. The following exception appears
gcc.exe fatal error no input files compilation terminated
Problem analysis
Due to the lack of C compiling environment in windows
Solutions
Install GCC environment
Download (win64 bit)
https://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win64/Personal%20Builds/mingw-builds/
Version
Select the latest version, and thread model: POSIX is recommended
Configure the environment variable and add D:: program files \ \ MinGW \ \ x86 to the path_ 64-8.1.0-release-posix-sjlj-rt_ v6-rev0 (1)\mingw64\bin
After the configuration is completed, try to compile, if there are still exceptions, please restart the machine
If there is still a problem after restart, you can set the C variable
Variable name: C_INCLUDE_Path path: D: \ “program files \” MinGW \ “x86_64-8.1.0-release-posix-sjlj-rt_v6-rev0 (1)\mingw64\include
Similar Posts:
- Python error: Unable to find vcvarsall.bat [How to Solve]
- C Compilation Error: implicit declaration of function xxx is invalid in C99 [-Wimplicit-function-declaration]
- Failed to install node with. MSI, rolling back action (Reprint)
- How to Solve Syntax error: Bad for loop variable (ubuntu)
- [Solved] cc1plus.exe: out of memory allocating bytes
- The solution of “the windows SDK version for 8.1 was not found” in vs2017 C + + compilation
- CMake: How to Complie Log4cplus
- How to Solve OpenCV3.4 error: ‘time’ was not declared in this scope
- Eclipse:Failed to load the JNI shared library
- Linux: Environment Variables C_INCLUDE_PATH, CPLUS_INCLUDE_PATH, CPATH Common Error [How to Solve]