You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've found your threadpool incredible and am using it for my C++ project. However, when I built it with g++ and c++11 library (option -std=c++11 ), i got into this issue:
thpool.c:68:3: error: changes meaning of ‘jobqueue’ from ‘typedef struct jobqueue jobqueue’ [-fpermissive] } jobqueue;
I've searched for solution and found out that princessannabelle had issued this on 2017. However, the problems may not lie in the worker function, but in some structure names that you've defined in thpool.cpp. Some of them are the same as some of your varriables, so that g++ got confused and raised errors, which may not happen with gcc due to differences in privacy of the 2 compilers.
I tried to change all the duplicated names and things works fine.
So, i opened this issue and suggest some modifications so that both C and C++ users can enjoy your work with more convenient. Here are my changes on your code that flow fine.
Thanks for your consideration
The text was updated successfully, but these errors were encountered:
I've found your threadpool incredible and am using it for my C++ project. However, when I built it with g++ and c++11 library (option
-std=c++11
), i got into this issue:thpool.c:68:3: error: changes meaning of ‘jobqueue’ from ‘typedef struct jobqueue jobqueue’ [-fpermissive] } jobqueue;
I've searched for solution and found out that
princessannabelle
had issued this on 2017. However, the problems may not lie in the worker function, but in some structure names that you've defined inthpool.cpp
. Some of them are the same as some of your varriables, so that g++ got confused and raised errors, which may not happen with gcc due to differences in privacy of the 2 compilers.I tried to change all the duplicated names and things works fine.
So, i opened this issue and suggest some modifications so that both C and C++ users can enjoy your work with more convenient. Here are my changes on your code that flow fine.
Thanks for your consideration
The text was updated successfully, but these errors were encountered: