Giter Club home page Giter Club logo

Comments (6)

Longtianmu avatar Longtianmu commented on June 12, 2024

换用其它HTTPLIB时会出现LNK2019: 无法解析的外部符号

from mirai-cpp.

cyanray avatar cyanray commented on June 12, 2024

麻烦贴出详细代码,说明意图,方便我帮你分析问题。

from mirai-cpp.

Longtianmu avatar Longtianmu commented on June 12, 2024

在main里仿照httplib官方示例使用如下代码进行POST的时候
image
会有如下报错
image

from mirai-cpp.

cyanray avatar cyanray commented on June 12, 2024

在main里仿照httplib官方示例使用如下代码进行POST的时候 image 会有如下报错 image

尝试引用httplib的头文件:

#include <mirai/third-party/httplib.h>

mirai-cpp的较新版本采用了 pimpl idiom,会尽量避免在 MiraiBot.hpp 引入第三方库,尤其是 httplib。
因为引入 httplib 会同时引入 windows.h,会带来大量宏定义,导致莫名其妙的编译错误(比如SendMessage这个宏,和MiraiBot::SendMessage冲突了),这样不好。

from mirai-cpp.

Longtianmu avatar Longtianmu commented on June 12, 2024

微软的这个宏定义属实是写了要挨打的那种(

from mirai-cpp.

Longtianmu avatar Longtianmu 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.