Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

代码跑不起来,提示FSMustByte FS undefined #65

Open
cjphaha opened this issue Jun 6, 2021 · 4 comments
Open

代码跑不起来,提示FSMustByte FS undefined #65

cjphaha opened this issue Jun 6, 2021 · 4 comments

Comments

@cjphaha
Copy link

cjphaha commented Jun 6, 2021

# github.com/opensec-cn/kunpeng/plugin/json
plugin/json/init.go:39:17: undefined: FSMustByte
plugin/json/init.go:60:12: undefined: FS

我拉取的是master分支的代码

@legolas-zeng
Copy link

image
同样报这个错。

@ywolf
Copy link
Member

ywolf commented Jul 29, 2021

静态资源打包进工程的小程序

go install github.com/mjibson/esc

打包JSON插件到项目代码中

esc -include='.json$' -o plugin/json/JSONPlugin.go -pkg jsonplugin plugin/json/

你们应该少了这个流程

@legolas-zeng
Copy link

静态资源打包进工程的小程序

go install github.com/mjibson/esc

打包JSON插件到项目代码中

esc -include='.json$' -o plugin/json/JSONPlugin.go -pkg jsonplugin plugin/json/

你们应该少了这个流程

我们是下载的源码跑的,这个打包操作是在哪里操作啊,求大神指教。

@ywolf
Copy link
Member

ywolf commented Jul 29, 2021

编译过程参考

# 静态资源打包进工程的小程序
go install github.com/mjibson/esc

# 打包JSON插件到项目代码中
esc -include='\.json$' -o plugin/json/JSONPlugin.go -pkg jsonplugin plugin/json/

go build -buildmode=c-shared --ldflags="-w -s -X main.VERSION=20190226" -o kunpeng_c.so

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants