build.go error when using protobuffers

xuanbao · · 425 次点击    
这是一个分享于 的资源,其中的信息可能已经有所发展或是发生改变。
<p>Hi</p> <p>I am trying to build a package, but build.go (version 1.6.3) fails with this message:</p> <pre><code>can&#39;t build package messages because it contains C++ files (xxx.pb.cc,yyy.pb.cc, [...etc.]) but it&#39;s not using cgo nor SWIG </code></pre> <p>The source files for the generated protobuf are xxx.proto, yyy.proto etc.</p> <p>There is not much information on the web that seems to be useful.</p> <p>The strange thing is that the same code compiles correctly when using a legacy protoc-gen-go executable. (I don&#39;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.)</p> <p>If someone could point me in a direction to solve this, I&#39;d be grateful!</p> <p>Thanks!</p> <hr/>**评论:**<br/><br/>mkevac: <pre><p>Which package? Why do you have *.cc files there? If you use --go_out=., then you will get *.go files, not *.cc</p></pre>veryflatcat: <pre><p>The project currently has been generating C, Python and Go code in one directory. I wonder if that&#39;s not the issue...</p></pre>styluss: <pre><p>I had this issue recently after installing a newer version over an old one. If that&#39;s the case, try deleting everything from the old version and after installing the new one it should stop.</p></pre>

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

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