1

I installed pthread just fine onto Visual Studio, but when I try compiling my code I get the

'timespec': 'struct type redefinition 

Where should I be looking to troubleshoot or what did I do wrong?

My code for reference:

#include<pthread.h>
#include<stdio.h>


int ready = 0;

void* myThreadFun(void* vargp) {
    printf("Printing from Thread \n");
    return NULL;
}


int main(int argc, char* argv[]) {
    pthread_t thread_id;
    printf("Before Thread\n");
    pthread_create(&thread_id, NULL, myThreadFun, NULL);
    pthread_join(thread_id, NULL);
    printf("After Thread\n");

}

Ptarala99
  • 23
  • 1
  • 1
  • 4

0 Answers0