Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
何 广一
intern_project_backend
Commits
2966ce43
Commit
2966ce43
authored
Jun 24, 2025
by
IronHammer Std
Browse files
更新readme
parent
fc3b47de
Changes
1
Hide whitespace changes
Inline
Side-by-side
readme.md
View file @
2966ce43
...
...
@@ -3,6 +3,58 @@
## 后端生成方式
### 依赖项
go编译器的版本应该至少需要1.14以上(也可能其实需要更高)
本人使用的是1.24.3版本的编译器。
依赖项目已经写在仓库当中的go.mod文件里面。
具体的依赖包括:
标准库:略
外部库:
-
gorm.io/driver/sqlite
-
gorm.io/gorm
安装外部库的脚本:
```
sh
go get
-u
gorm.io/gorm
go get
-u
gorm.io/driver/sqlite
```
### 生成前的准备
有必要的话提前安装依赖(可能需要翻墙)
打开CGO:
```
sh
go
env
-w
CGO_ENABLED
=
1
```
需要确保CGO开启,且PATH环境变量当中能找到64位的GCC。
检查能否找到GCC,可以在控制台当中输入:
```
sh
gcc
--version
```
如果有来自gcc的输出,则说明可用。请保证找到的GCC是64位的。
另外,如果没有gcc,请自行安装gcc。
在windows系统下的话,可以选用
[
tdm-gcc
](
https://github.com/jmeubank/tdm-gcc/releases
)
。
如果上述检查通过,但go编译器仍返回找不到gcc的话,请重启shell。
### 生成指令
在本地的项目文件夹里面运行下述指令即可。
```
sh
go build
```
## 参数配置与启动
设生成好的exe文件为BackEnd.exe。
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment