热门

最新

红包

立Flag

投票

同城

我的

发布
u011410413
取啥都被占用
2 年前
trueu011410413

macos cannot convert 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'String' c++程序在macos上不灵光,报错是这个。根源上好像是gcc和c++ standard library混淆。我只说解决。报错的字符串变量后面加.c_str()。
void BleKeyboard::begin(void)
{
BLEDevice::init(deviceName.c_str()); //根据stackexchange交流修改。
BLEServer* pServer = BLEDevice::createServer();
pServer->setCallbacks(this);

hid = new BLEHIDDevice(pServer);
inputKeyboard = hid->inputReport(KEYBOARD_ID); // <-- input REPORTID from report map
outputKeyboard = hid->outputReport(KEYBOARD_ID);
inputMediaKeys = hid->inputReport(MEDIA_KEYS_ID);

outputKeyboard->setCallbacks(this);

hid->manufacturer()->setValue(deviceManufacturer.c_str()); //根据stackexchange交流修改。

CSDN App 扫码分享
分享
评论
点赞
打赏
  • 复制链接
  • 举报
下一条:
Llama3-V:一款与GPT4-V、Gemini Ultra、Claude Opus性能相当的SOTA开源视觉语言模型,模型大小缩小了100倍快速阅读:https://www.marktechpost.com/2024/05/31/llama3-v-a-sota-open-source-vlm-model-comparable-performance-to-gpt4-v-gemini-ultra-claude-opus-with-a-100x-smaller-model/模型:https://huggingface.co/mustafaaljadery/llama3vGitHub:https://github.com/mustafaaljadery/llama3v@taeyunh @食味小哥 @柳时一
立即登录