You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, first of all thank you a lot for your amazing work !
Bug Report
I get linker errors when using std::atomic<unsigned> in my code :
/opt/devkitpro/devkitARM/bin/../lib/gcc/arm-none-eabi/14.1.0/../../../../arm-none-eabi/bin/ld: main.o: in function `std::__atomic_base<unsigned int>::fetch_add(unsigned int, std::memory_order)':
/opt/devkitpro/devkitARM/arm-none-eabi/include/c++/14.1.0/bits/atomic_base.h:631:(.text+0x74): undefined reference to `__atomic_fetch_add_4'
/opt/devkitpro/devkitARM/bin/../lib/gcc/arm-none-eabi/14.1.0/../../../../arm-none-eabi/bin/ld: /opt/devkitpro/devkitARM/arm-none-eabi/include/c++/14.1.0/bits/atomic_base.h:631:(.text+0xc8): undefined reference to `__atomic_fetch_add_4'
I'm compiling with -std=gnu++23 flag, but I also got the error with -std=gnu++20 and -std=gnu++17.
I use Arch Linux and I installed devkitpro using pacman. I haven't modified devkitpro.
My environment variables :
Hi, first of all thank you a lot for your amazing work !
Bug Report
I get linker errors when using
std::atomic<unsigned>
in my code :I'm compiling with
-std=gnu++23
flag, but I also got the error with-std=gnu++20
and-std=gnu++17
.I use Arch Linux and I installed devkitpro using pacman. I haven't modified devkitpro.
My environment variables :
Output of
arm-none-eabi-g++ -v
:I only use libnds in my code, no other dependency.
How to fix it
After googling the undefined reference message, I found this github issue and adding this function solves the problem for me :
The text was updated successfully, but these errors were encountered: