Giter Club home page Giter Club logo

Comments (4)

cyanray avatar cyanray commented on June 12, 2024

问题解决了吗,可以具体说一下是什么样的问题以及如何解决的吗?
你的问题也许可以让文档变得更清晰易懂。

from mirai-cpp.

YXHXianYu avatar YXHXianYu commented on June 12, 2024

我对vs和cmake不太熟悉。
我修改了下cmakelists.txt文件,再重新保存,生成cmake,然后才能进行“调试”。
然后右上角绿色箭头的启动项那边要选择cpp对应的exe,比如这里的RepeatMessage.exe,才可以进行第四步的”调试和启动设置...“

所以这里第六步的图片好像要提前?不然没法进行第四步。

这个问题解决后我又遇到了一个问题,是关于编译出的可执行文件如何和mirai-api-http沟通的问题?
看了下其他接口,好像是利用WebSocket之类的东西沟通?
那正确的使用方式,是否是:同时打开两个exe(一个mirai-api-http,另一个编译出的RepeatMessage.exe),通过websocket的参数设置,使得两个程序进行沟通,然后在mirai-api-http中登入账号,就可以使用?
我这部分知识没学过,研究了好久没怎么弄懂。

多谢!

from mirai-cpp.

cyanray avatar cyanray commented on June 12, 2024

mirai-console + mirai-api-http 是一部分,要先启动它,这样 mirai-api-http 会提供 http 和 websocket 服务。
然后启动基于 mirai-cpp 的程序(不要将它视为插件,将它视为一个服务器程序)。mirai-cpp 会使用 mah 提供的 http 和 websocket 服务。
你需要让 mirai-cpp 的程序知道 mah 提供的 http(websocket) 服务的IP地址和端口。
找找你的代码里有没有这样一句:

SessionOptions opts = SessionOptions::FromCommandLine(argc, argv);

这说明你需要通过命令行告诉 mirai-cpp 这些信息。

文档已经提示了。

from mirai-cpp.

YXHXianYu avatar YXHXianYu commented on June 12, 2024

哦懂了懂了,感谢!

from mirai-cpp.

Related Issues (20)

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.