error: expected '{' before 'type_'//type_前面少了个,
error: invalid use of non-static member function//把function当变量使用了
error: 'OpValidation' is not a member of 'dtu_idc'//最上面没有写include 对应文件
error: 'OpValidation' is not a member of 'dtu_idc'
//op_validation.h没写
//#ifndef DTU_IDC_LIB_IDC_OP_OP_VALIDATION_H_
//#define DTU_IDC_LIB_IDC_OP_OP_VALIDATION_H_
error: no matching function for call to 'dtu_idc::OpValidation::OpValidation(std::basic_string<char>, std::basic_string<char>, std::basic_string<char>, std::basic_string<char>, std::basic_string<char>, std::basic_string<char>)'
// // 括号里的参数个数和OpValidation中个数不匹配
// auto op_validation = std::make_unique<dtu_idc::OpValidation>(
// option->layer(), option->action(), option->func(),type->type(),
// option->input(), option->output(), option->evnfile()
[BT][ERROR] sig num 11 Segmentation fault thread id 23101
//机器问题 重启机器
error: 'ifstream' was not declared in this scope
//没有加命名空间
//第一次声明字符串用
std::str=0
//后面再用 对
str=CmdExe
error: undefined reference to 'dtu_idc::FilterPath::FilterPath()'
//构造函数 在头文件中写成了这样FilterPath() 未在原文件中写FilterPath(){} ;要么直接没头文件的话构造函数写成FilterPath(){}
Segmentation fault (core dumped)
去使用vector范围外的值 如vector大小为1 去取值v[1] 取值了不使用不会报错 如果去使用v[1]就会报错
如果整体报错 没报细节错误 那么就是build的依赖库之间有重复
使用函数是记得加上命名空间
int64 was not declear in this scope//----用int64_t 不是int64 #include <typeinfo>
error: expected constructor, destructor, or type conversion before '(' token//TEST头文件未加
switch语句中编程错误:jump to case label//若在case里声明局部变量 那么case里的东西要用{}括起来 因为不括的话 后面的case也会用
//模板函数不用写函数声明 直接写函数实现 放在头文件里
//bazel编译是 没报错误但是编译失败---头文件对应的bazel中的依赖没写对
//头文件中有对文件的include 但是使用被include的文件中的函数报错--被引用的头文件的函数是被namespace扩着的 所以使用时要么自己的文件也加相同的namespace扩起来 要么命名空间::函数
//读取json文件获取键值对失败 --忘记export ENFLAME_OPTIONS_IDC_DBG='--hlir-opv=/home/rui.xue/workspace/tops/sdk/lib/idc/func/dss_k.json' 去设置读取文件路径
too many arguments //头文件里定义的函数参数和函数使用时参数不一样
函数not declare //使用次函数对应的头文件加了 但是命名空间没有加
C++常见报错
于 2022-01-21 16:40:53 首次发布