Coder Social home page Coder Social logo

cqcppsdk's People

Contributors

lxdlam avatar moemod avatar nnnewb avatar stdrc avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

cqcppsdk's Issues

改用u8path后,path.string()要改为path.u8string()

https://github.com/cqmoe/cqcppsdk/blob/631fbfb761a8b987f3893706959ba5b307cb7743/src/dev_mode/api.cpp#L204-L216

    std::string get_app_directory() {
        print_api_call("get_app_directory");
        const auto app_dir = fs::u8path(get_coolq_root_directory()) / "data" / "app" / "";
        dir::create_dir_if_not_exists(app_dir.u8string());
        return app_dir.u8string();
    }

    std::string get_coolq_root_directory() {
        print_api_call("get_coolq_root_directory");
        string root_dir = FAKE_COOLQ_ROOT_DIR;
        dir::create_dir_if_not_exists(root_dir);
        return fs::absolute(fs::u8path(root_dir)).u8string();
    }

event.h报错

一开始文件还可以生成,但是在我加了几行代码后显示event.h出现各种错误。我重新下载了cqcppsdk的所有文件并放入extern文件夹,还是显示同样的报错。
报错信息
新增的代码
更改后的头文件:

#include<iostream>
#include<set>
#include<sstream>
#include<cstdio>
#include<cmath>
#include<cstdlib>
#include<ctime>
#include<urlmon.h>
#include<string>
#include<fstream>

#include<cqcppsdk/cqcppsdk.h>

#pragma comment(lib,"urlmon.lib")

Compilation Failed

When trying to run cmake build, I got the follwing error:

[build] In file included from c:\mingw\lib\gcc\mingw32\8.2.0\include\c++\filesystem:37,
[build]                  from E:\awesome-bot\extern\cqcppsdk\src\dev_mode\api.cpp:5:
[build] c:\mingw\lib\gcc\mingw32\8.2.0\include\c++\bits\fs_path.h: In member function 'std::filesystem::__cxx11::path& std::filesystem::__cxx11::path::operator/=(const std::filesystem::__cxx11::path&)':
[build] c:\mingw\lib\gcc\mingw32\8.2.0\include\c++\bits\fs_path.h:237:47: error: no match for 'operator!=' (operand types are 'std::filesystem::__cxx11::path' and 'std::filesystem::__cxx11::path')
[build]     || (__p.has_root_name() && __p.root_name() != root_name()))
[build]                                ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~
[build] In file included from c:\mingw\lib\gcc\mingw32\8.2.0\include\c++\iosfwd:40,
[build]                  from c:\mingw\lib\gcc\mingw32\8.2.0\include\c++\system_error:40,
[build]                  from c:\mingw\lib\gcc\mingw32\8.2.0\include\c++\bits\fs_fwd.h:35,
[build]                  from c:\mingw\lib\gcc\mingw32\8.2.0\include\c++\filesystem:36,
[build]                  from E:\awesome-bot\extern\cqcppsdk\src\dev_mode\api.cpp:5:
[build] c:\mingw\lib\gcc\mingw32\8.2.0\include\c++\bits\postypes.h:221:5: note: candidate: 'template<class _StateT> bool std::operator!=(const std::fpos<_StateT>&, const std::fpos<_StateT>&)'
[build]      operator!=(const fpos<_StateT>& __lhs, const fpos<_StateT>& __rhs)
[build]      ^~~~~~~~

You may access the full output file here.

I am using Visual Studio Code and MinGW g++ 8.2.0 as my compiler.

关于 _O_WTEXT 未定义的情况

环境:MinGW GCC9.2.0CMake3.16.3
VSCode插件:CMake Tools1.3.1
选用 GCC for mingw32 9.2.0 工具包后,可正常配置文件夹,而在生成时出现如下错误:

[build] D:\BOT\extern\cqcppsdk\src\dev_mode\main.cpp: In function 'int main()':
[build] D:\BOT\extern\cqcppsdk\src\dev_mode\main.cpp:71:30: error: '_O_WTEXT' was not declared in this scope; did you mean 'O_TEXT'?
[build]    71 |     _setmode(_fileno(stdin), _O_WTEXT);
[build]       |                              ^~~~~~~~
[build]       |                              O_TEXT
[build] CMakeFiles\app_dev.dir\build.make:90: recipe for target 'CMakeFiles/app_dev.dir/extern/cqcppsdk/src/dev_mode/main.cpp.obj' failed
[build] mingw32-make.exe[2]: *** [CMakeFiles/app_dev.dir/extern/cqcppsdk/src/dev_mode/main.cpp.obj] Error 1
[build] CMakeFiles\Makefile2:123: recipe for target 'CMakeFiles/app_dev.dir/all' failed
[build] mingw32-make.exe[1]: *** [CMakeFiles/app_dev.dir/all] Error 2
[build] Makefile:128: recipe for target 'all' failed
[build] mingw32-make.exe: *** [all] Error 2
[build] 生成已完成,退出代码为 2

报错处源代码:

#ifdef WIN32
    // 保存当前控制台代码页
    old_code_page = GetConsoleCP();
    // 设置控制台代码页为 UTF-8
    SetConsoleCP(CP_UTF8);
    SetConsoleOutputCP(CP_UTF8);
    // 设置读取模式为宽字符
    _setmode(_fileno(stdin), _O_WTEXT);
#endif

_O_WTEXT 改为 _O_TEXT 即可正常生成,这是否会影响正常工作?以及报错原因是什么?

跨平台vcpkg支持无效

macOS使用mingw i686跨平台编译demo通过
按照SDK上的,在macOS上装了一个vcpkg然后想指定triplet 为x86-windows-static-md(似乎要求的动态CRT配置在vcpkg中自带了)
但是在安装库的时候出现了错误Cannot build windows triplets from non-windows.
vcpkg是否无法跨平台编译?还是需要额外的步骤指示vcpkg识别mingw工具链?

关于include中dolores的问题

看到示例中大量使用了 dolores namespace 中的函数,但在文档中没有看到与此相关的介绍,希望得到科普

提供一个获取群名片/昵称的函数

1. 取群成员信息,如果失败跳到第四步
2. 如果群名片不为空,返回群名片
3. 返回昵称
4. 取陌生人信息,如果失败跳到第六步
5. 返回昵称
6. 返回QQ号形成的字符串

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.