Login
Username:

Password:

Remember me



Lost Password?

Register now!

Sections

Who's Online
44 user(s) are online (32 user(s) are browsing Forums)

Members: 0
Guests: 44

more...

Support us!

Headlines

 
  Register To Post  

GCC 11, atomic_bool and linker errors
Just can't stay away
Just can't stay away


See User information
I'm trying to compile something like:

// gcc atomic.cpp -Wall -athread=native -std=c++20

#include <atomic>

int main()
{
    
std::atomic_bool ab false;

    
ab true;
    
ab.notify_one();

    
ab.wait(false);

    return 
0;
}


But it gives linker errors. Issue seems to be functionality added in C++20 (wait and notify_one). Wondering if this is some known issue and should I report it somewhere.

Go to top
Re: GCC 11, atomic_bool and linker errors
Just can't stay away
Just can't stay away


See User information
It compiles if you use

ppc-amigaos-g++ -o atomic atomic.cpp -std=c++20 -athread=native -latomic

or

ppc-amigaos-gcc -o atomic atomic.cpp -std=c++20 -athread=native -latomic -lstdc++

Go to top

  Register To Post

 




Currently Active Users Viewing This Thread: 2 ( 0 members and 2 Anonymous Users )



Polls
Running AmigaOS 4 on?
AmigaOne SE/XE or microA1 12% (26)
Pegasos2 3% (8)
X5000 22% (48)
X1000 14% (30)
A1222 8% (19)
Sam 440/460 18% (40)
Classic PowerPC Amiga 2% (6)
WinUAE emulation 7% (16)
Qemu emulation 9% (21)
Total Votes: 214
The poll closed at 2025/12/1 12:00
6 Comments


Powered by XOOPS 2.0 © 2001-2024 The XOOPS Project