Comments (6)
换用其它HTTPLIB时会出现LNK2019: 无法解析的外部符号
from mirai-cpp.
麻烦贴出详细代码,说明意图,方便我帮你分析问题。
from mirai-cpp.
在main里仿照httplib官方示例使用如下代码进行POST的时候
会有如下报错
from mirai-cpp.
尝试引用httplib的头文件:
#include <mirai/third-party/httplib.h>
mirai-cpp的较新版本采用了 pimpl idiom,会尽量避免在 MiraiBot.hpp 引入第三方库,尤其是 httplib。
因为引入 httplib 会同时引入 windows.h,会带来大量宏定义,导致莫名其妙的编译错误(比如SendMessage这个宏,和MiraiBot::SendMessage冲突了),这样不好。
from mirai-cpp.
微软的这个宏定义属实是写了要挨打的那种(
from mirai-cpp.
问题已解决 谢谢
from mirai-cpp.
Related Issues (20)
- 统一源文件命名格式
- 发送语音消息时VoiceMessage::length_未初始化导致mirai-api-http可能返回400
- websocket 连接正常,但是无法触发事件处理函数 HOT 11
- 希望能给GroupMessage添加一个GroupId HOT 2
- 新增一系列无异常的 Try* 模式的接口
- 有关LostConnectionCallback的一些问题 HOT 3
- 目前的项目在使用mirai-cpp,可否在readme做下推广呢? HOT 1
- 关于MessageChain == 比较的问题 [Bug?] HOT 1
- 更新cpp-httplib以保证线程安全 HOT 1
- 拼写错误,解析json失败 HOT 1
- 将 const std::string& 替换为 std::string_view 以简化代码
- 有时QQ客户端收不到消息 HOT 2
- 有关VoiceMessage的问题 HOT 2
- Command.Member->Group.GID 可能为空 HOT 3
- MFC开发 HOT 1
- 分享一个非常蒻的Bot HOT 1
- 关于VoiceMessage.Url() HOT 3
- 关于MessageChain().Add<VoiceMessage>(); HOT 9
- 无法上传文件 HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mirai-cpp.