NO

Author Topic: Unresolved external symbol with atomic 64 bit types.  (Read 2132 times)

neo313

  • Guest
Unresolved external symbol with atomic 64 bit types.
« on: July 28, 2014, 12:36:30 AM »
Code gives these errors:

POLINK: error: Unresolved external symbol '___atomic_fetch_add64_explicit'.
POLINK: error: Unresolved external symbol '___atomic_fetch_sub64_explicit'.
POLINK: error: Unresolved external symbol '___atomic_fetch_xor64_explicit'.
POLINK: error: Unresolved external symbol '___atomic_fetch_or64_explicit'.
POLINK: error: Unresolved external symbol '___atomic_exchange64_explicit'.
POLINK: error: Unresolved external symbol '___atomic_compare_exchange64_strong_explicit'.


This happens if using any atomic 64 bit type variable; _Atomic unsigned long long, _Atomic long long, atomic_uint_fast64_t, atomic_uint_least64_t...

Changing variable a to any other type 32,16 bit... removes the errors.

Code: [Select]
#include <stdatomic.h>
#include <stdint.h>

int main( void )
{
atomic_ullong a ;
atomic_store( &a , 1 ) ;

uint64_t b = atomic_fetch_add( &a , 1 ) ;
b = atomic_fetch_sub( &a , 1 ) ;
b = atomic_fetch_xor( &a , 1 ) ;
b = atomic_fetch_or( &a , 1 ) ;

uint64_t c = 2 ;
uint64_t d = atomic_exchange( &a , c ) ;

uint64_t e = 3 ;
uint64_t f = 4 ;
uint64_t g = atomic_compare_exchange_strong( &a , &e , f ) ;

( void )g ;
( void )d ;
( void )b ;

return 0;
}

I'm using RC5 32bit , and I think my installation went fine. Can anyone confirm this?
« Last Edit: July 28, 2014, 12:44:39 AM by neo313 »