ctadlock
Active member
Teensy 4.1 1.58
Clion 2023.3.4
PlatformIO 6.1.13
toolchain-gccarmnoneeabi-teensy 11.3.1
Windows 11
platformio.ini (nothing interesting)
Im trying to create a function callback in a class. If the callback takes an argument it fails.
This works:
This does not work:
I get the following errors in linking:
Thoughts?
Atttached are success and failure builds.
Clion 2023.3.4
PlatformIO 6.1.13
toolchain-gccarmnoneeabi-teensy 11.3.1
Windows 11
platformio.ini (nothing interesting)
Im trying to create a function callback in a class. If the callback takes an argument it fails.
This works:
Code:
std::function<void()> onChanged_;
This does not work:
Code:
std::function<void(int)> onChanged_;
I get the following errors in linking:
Code:
Linking .pio\build\teensy41_debug\firmware.elf
c:/users/xxx/.platformio/packages/toolchain-gccarmnoneeabi-teensy/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/bin/ld.exe: .pio\build\teensy41_debug\libFrameworkArduino.a(new.cpp.o): in function `operator delete(void*)':
new.cpp:(.text._ZdlPv+0x0): multiple definition of `operator delete(void*)'; c:/users/xxx/.platformio/packages/toolchain-gccarmnoneeabi-teensy/bin/../lib/gcc/arm-none-eabi/11.3.1/thumb/v7e-m+dp/hard\libstdc++.a(del_op.o):(.text._ZdlPv+0x0): first defined here
c:/users/xxx/.platformio/packages/toolchain-gccarmnoneeabi-teensy/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/bin/ld.exe: .pio\build\teensy41_debug\libFrameworkArduino.a(new.cpp.o): in function `operator delete(void*, unsigned int)':
new.cpp:(.text._ZdlPvj+0x0): multiple definition of `operator delete(void*, unsigned int)'; c:/users/xxx/.platformio/packages/toolchain-gccarmnoneeabi-teensy/bin/../lib/gcc/arm-none-eabi/11.3.1/thumb/v7e-m+dp/hard\libstdc++.a(del_ops.o):(.text._ZdlPvj+0x0): first defined here
collect2.exe: error: ld returned 1 exit status
*** [.pio\build\teensy41_debug\firmware.elf] Error 1
Thoughts?
Atttached are success and failure builds.
Attachments
Last edited: