怎么编译程序? 先输入d: 可以调用是显示这样的。 链接器:link.exe 常见的编译错误1)找不到头文件 找不到头文件往往会提示如下错误:hello.cpp(2):fatal error C1083:Cannot open include file:opencv2/opencv.hppp':No such file or directory 2)拼写错误 hello.cpp(9):error C3861:'imreadd':identifier not found 3)常见链接错误 1>hello.obj:error LNK2019:unresolved external symbol"class cv::Mat cdecl cv::imread(class std::basic string<char,struct std::char traits<char>,class std::allocator<char>>const&,int)"(?imreadecveGYA?AVMate18ABV?basic stringeDU?char traitseDestdee V?SallocatoreDe200std00H8z)referenced in function main 4)运行时错误 经过编译和连接过程,生成了可执行的文件(如exe文件)之后,在运行这个可执行文件所产生的错误是运行时错误。比较常见的运行时错误是内存错误。 以上错误提示来源:《OpenCV入门教程》 |
|