Arduino-Makefile:编译器无法编译用户库 cpp 文件
Arduino-Makefile: Compiler can't compile the user library cpp files
我正在尝试将 https://github.com/sudar/Arduino-Makefile 用于 Raspberry Pi 上的 Arduino 与一些用户 cpp 库一起使用,但它无法编译并显示以下错误。
/usr/share/arduino/hardware/tools/avr/bin/avr-gcc -mmcu=atmega2560 -wl,--gc-sections -os -flto -fuse-linker-plugin -o build-mega-atmega2560/toprint.elf build-mega-atmega2560/toprint.ino.o build-mega-atmega2560/libcore.a -lc -lm/tmp/cc1J77Gh.ltrans0.ltrans.o: 在函数
main': <artificial>:(.text.startup+0x4be): undefined reference to
Str2let::~Str2let((' collect2: 错误: ld 返回 1 退出状态: [/home/pi/Desktop/demo1_may9/Arduino/toprint/Arduino-Makefile/Arduino.mk:1673: build-mega-atmega2560/toprint.elf] 错误 1
我的配置文件是
ARDUINO_DIR = /usr/share/arduino
MONITOR_PORT = /dev/ttyACM*
USER_LIB_PATH = /home/pi/sketchbook/libraries
#BOARD_SUB = mega2560 #replaced by below
MCU = atmega2560
# Define Atmega2560
BOARD_TAG = mega
BOARD_SUB = atmega2560
AVRDUDE = /usr/share/arduino/hardware/tools/avr
包括/home/pi/Desktop/demo1_may9/Arduino/toprint/Arduino-Makefile/Arduino.mk 有谁知道发生了什么?
相同的代码可以在Mac上运行,但不能在Pi上运行。
通过使用本文中的case[2]
解决了它。只是不要定义USER_LIB_PATH
并将所有文件放在与 .ino 和 Makefile 相同的位置。
- .cpp和.h文件中的模板专用化声明
- 为什么两个不同的未命名名称空间可以共存于一个cpp文件中
- Linux的Cpp上的计时器
- 如何运行位于boost/libs/python/example/tutorial目录中的hello.cpp和Jamfil
- 命名空间中具有.h和.cpp文件的类
- 内置函数可查看CPP中的成员变量
- C++如何通过用户输入删除列表元素
- 创建一个函数以在输入为负数或零时输出字符串.第一次执行用户定义的函数
- 无法编译 rtmidi 测试 cmidiin.cpp 文件, 非法指令
- Cpp-Tuple使用带有变量的get
- Arduino-Makefile:编译器无法编译用户库 cpp 文件
- 从用户定义的头文件调用函数时出现未定义的引用错误,其实现位于.cpp文件中
- 作为传递给 CPP 类构造函数的参数的用户定义函数
- 来自 cpp首选项的用户定义的 const char* 文字示例
- Cpp:Cpp中的JSON解析器,提供支持序列化/反序列化功能,将JSON对象转换为用户定义的类
- 大小的字符数组来自用户 - CPP
- Msbuild不导入Microsoft.Cpp.x64用户选项
- 修改cpp中当前用户的定义
- C: 用户约书亚桌面游戏项目 SFML项目测试渲染.cpp | 15 |错误:'类s
- CPP/Gdb 返回 0;导致所有用户的会话登录