GithubHelp home page GithubHelp logo

加载模块 luapb失败 about luapb HOT 5 OPEN

zhanjunxiong avatar zhanjunxiong commented on September 4, 2024
加载模块 luapb失败

from luapb.

Comments (5)

zhanjunxiong avatar zhanjunxiong commented on September 4, 2024

你是不是没有安装protobuf
或者安装的protobuf的版本不对

from luapb.

oneStarCai avatar oneStarCai commented on September 4, 2024

你好,现在可以跑起来了。但是还有一点不明白,请教一下:
pb_parseFromString里边调用的是message->ParseFromArray(bin, bin_len); 而pb_serializeToString里边却是调用message->SerializeToString(&msg);
ParseFromArray和SerializeToArray, 以及ParseFromString和SerializeToString不是承兑出现的吗?

from luapb.

zhanjunxiong avatar zhanjunxiong commented on September 4, 2024

嗯 应该是要像你说的才对。

from luapb.

oneStarCai avatar oneStarCai commented on September 4, 2024

如果要用SerializeToArray,lua怎么实现呢?不能使用lua_pushlstring这个函数了吧,有其他函数可以实现这个功能吗?

from luapb.

zhanjunxiong avatar zhanjunxiong commented on September 4, 2024

我的理解是 SerializeToArray 和 SerializeToString 差不多的
对于lua层来说,都是把string当成数组
你把lua层传进来的string 当成数组处理一下看看吧 应该是一样的效果
当然要考虑会不会string被截断的问题。

from luapb.

Related Issues (15)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.