I am using APR for thread in my Windows based application. I am using VS 6.0 for compiling the program. I am using APR version 2.0.48.
My application is written in C++ language. I am facing problem when I try to compile my program. Here is a sample code:
Public Class OOPS
void* APR_THREAD_FUNC ThreadProc (void* data)
pritf(“it worked dude”);
if( apr_thread_create( &thread, NULL, ThreadProc, NULL,NULL) != APR_SUCCESS)
printf( "Could not create the thread\n");
int main(int argc, char* argv)
OOPS* pOOPS = new OOPS;
when I compile the above I get following error:
'apr_thread_create' : cannot convert parameter 3 from 'void *(void *)' to 'void *(__stdcall *)(struct apr_thread_t *,void *)'
None of the functions with this name in scope match the target type
It seems apr is not able to convert “ThreadProc” to 'void *(__stdcall *)(struct apr_thread_t *,void *)'.
If anyone has used APR with C++, please help me out.