node-addon-api
node-addon-api copied to clipboard
Build problem using VS2019 when upgrading addon from 1.7.2 to 4.3.0
I'm upgrading an addon I developed in VS2019 from node-addon-api version 1.7.2 to 4.3.0. When I build I get the error "'_mutex': unknown override specifier" and "missing type specifier - int assumed. Note: C++ does not support default-int" which points to line 2886 in napi.h:
std::mutex _mutex;
I couldn't locate any references to _mutex. If I comment this line out, the build runs fine.
_mutex is used for example: https://github.com/nodejs/node-addon-api/blob/40ed7ce40914dedfe0c4a2b9f0cf741e3659adbb/napi-inl.h#L5990
It may compile ok as you are not using AsyncProgressWorker in your code, not sure.
@vmoroz as our Windows knowledgeable person, any suggestions of what might be going on
This issue is stale because it has been open many days with no activity. It will be closed soon unless the stale label is removed or a comment is made.