I am porting my windows code to linux. when i am using ACE_Atomic_Op api, compiler is throwing some error as shown below
variable "ACE_Atomic_Op<ACE_Thread_Mutex, unsigned int> AcsHcs::Cache::cnt"
has initializer but incomplete type"
my code is as follows:
in Cache.h file i have
static ACE_Atomic_Op<ACE_Thread_Mutex, unsigned int> cnt;
and in cache.cpp i am declaring cnt as
ACE_Atomic_Op<ACE_Thread_Mutex, unsigned int> Cache::cnt = 0;
this works fine in windows, but it is throwing error in linux
can anyone tell me whats the problem is?
thanks in advance