OpenCV3.4 'nullptr' was not declared in this scope

那就给他返回一个空地址即可
原代码

  1. 编译环境Windows
  2. 目标编译平台Windows
  3. 编译工具Mingw5.3
  4. 报错文件io_win32.cc
  5. 报错行 94
template <typename char_type>
bool null_or_empty(const char_type* s) {
    //TODO: nullptr error
  return (s == nullptr || *s == 0);
}

函数本来要返回的是空指针但是却没有nullptr 在系统中空指针的值是0xCC(传说中的烫烫烫) 修改为0xCC就好了

template <typename char_type>
bool null_or_empty(const char_type* s) {
    //TODO: nullptr error
  return (s == 0xcc || *s == 0);
}

猜你喜欢

转载自my.oschina.net/VenusV/blog/1650276
今日推荐