hi,
I’m attempting to run a code example; however, the compiler gets stuck at the pthread_create statements: see attachments
MultithreadingExample2.cpp (1.13 KB)
MultithreadingExample2.h (426 Bytes)
hi,
I’m attempting to run a code example; however, the compiler gets stuck at the pthread_create statements: see attachments
You are passing a pointer to a member function. Member function has one additional argument so it cannot be used this way.
StackOverflow has several discussions on the topic, e.g.: c++ - pthread function from a class - Stack Overflow
I have looked at this article and found it difficult to understand; do you know of a tutorial that explains the subject in clearer detail?
okay,
I fiddled around with the property setting on “nsight” and I was able to get to this point: see attachment
How to do I fix the link error?
Simply replace “-lpthread” with “pthread” on the “Libraries” property page.
thanks,
It works!