build.go error when using protobuffers

polaris · 2016-08-02 10:00:10 · 1142 次点击    
这是一个分享于 2016-08-02 10:00:10 的资源,其中的信息可能已经有所发展或是发生改变。

Hi

I am trying to build a package, but build.go (version 1.6.3) fails with this message:

can't build package messages because it contains C++ files (xxx.pb.cc,yyy.pb.cc, [...etc.]) but it's not using cgo nor SWIG

The source files for the generated protobuf are xxx.proto, yyy.proto etc.

There is not much information on the web that seems to be useful.

The strange thing is that the same code compiles correctly when using a legacy protoc-gen-go executable. (I don't know where this version came from - it is part of a project I am new to. But probably from the code.google.com days.)

If someone could point me in a direction to solve this, I'd be grateful!

Thanks!


评论:

mkevac:

Which package? Why do you have .cc files there? If you use --go_out=., then you will get .go files, not *.cc

veryflatcat:

The project currently has been generating C, Python and Go code in one directory. I wonder if that's not the issue...

styluss:

I had this issue recently after installing a newer version over an old one. If that's the case, try deleting everything from the old version and after installing the new one it should stop.


入群交流(和以上内容无关):加入Go大咖交流群,或添加微信:liuxiaoyan-s 备注:入群;或加QQ群:692541889

1142 次点击  
加入收藏 微博
暂无回复
添加一条新回复 (您需要 登录 后才能回复 没有账号 ?)
  • 请尽量让自己的回复能够对别人有帮助
  • 支持 Markdown 格式, **粗体**、~~删除线~~、`单行代码`
  • 支持 @ 本站用户;支持表情(输入 : 提示),见 Emoji cheat sheet
  • 图片支持拖拽、截图粘贴等方式上传