arduino库的cpp文件错误
Error in cpp file of an arduino library
我正在研究一个项目,其中包括Arduino和指纹扫描仪。它完全基于嵌入式系统。不过,我为指纹扫描仪下载了一个库。当我运行程序时,我得到一个映射到库文件的cpp文件的错误。查看下面的错误和库文件。
误差 FPS_GT511C3 FPS_GT511C3.c.cpp。在函数Command_Packet::GetPacketBytes()':
C:UsersDiptiDocumentsArduinolibrariesFPS_GT511C3/FPS_GT511C3.c.cpp:17: undefined reference to
中operator new[](unsigned int)'FPS_GT511C3 FPS_GT511C3.c.cpp。在函数FPS_GT511C3::GetResponse()':
C:UsersDiptiDocumentsArduinolibrariesFPS_GT511C3/FPS_GT511C3.c.cpp:735: undefined reference to
中operator new[](unsigned int)'Collect2.exe: error: ld returned 1 exit status
库文件(CPP)
byte* packetbytes= new byte[12];
byte* resp = new byte[12];
您还没有说明您是如何构建代码的,甚至没有说明您正在使用什么编译器,这使得很难回答。
我猜你没有链接到c++运行时。如果您正在使用GCC,那么您应该使用g++
而不是gcc
来构建c++代码,以便自动使用c++运行时库。
- 用MacOS Mojave编译C++:致命错误:mpi.h:没有这样的文件或目录
- 多个文件的内存分配错误"在抛出 'std :: bad_alloc' what (): std :: bad_alloc 的实例后终止调用" [C++]
- 如何在文件和行号中抛出错误
- 防止在C++中选择错误文件时提升 xml 解析器崩溃
- AMQP-CPP >处理程序中的错误文件描述符
- Xcode OSX上的C++构建失败,出现多个错误文件IO..不可用:在macOS 10.15中引入
- 为什么生成文件返回 g++: 错误: h 文件或目录 make: *** [生成文件:12: 测试] 错误 1?
- 警告:打开错误文件(/build/opencv/modules/videoio/src/cap_ffmpeg_impl.
- Ubuntu C++ 编译器错误: g++: 错误: 文件.cpp: 没有这样的文件或目录
- main.cc:5:30:致命错误:文件夹/file.h:没有这样的文件或目录
- C++ LNK2005"已定义"错误 - 文件引用自身
- C++:模拟餐饮公司计费程序-无法将错误数据输出到错误文件
- 博兰德C++链接器错误c文件包括
- Visual Studio 2015 代码覆盖率错误文件
- 使用system()与Gnuplot进行绘图会导致错误:文件不可读
- 是否存在fseek/ftell可能给出错误文件大小的情况
- g++编译错误.h文件
- c++编译错误:.o文件未找到
- 打开错误文件的错误消息
- Ndk-build输出添加符号错误.文件格式错误