-
Notifications
You must be signed in to change notification settings - Fork 603
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Errors when compiling with C++ #95
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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: