Skip to content

fix: Remove unused import of windows.h #210

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

rotu
Copy link
Contributor

@rotu rotu commented Feb 27, 2025

Fixes #199 by not including the header with offending min/max macros.
Alternative fix to #208.

@rotu rotu changed the title Remove unused import of windows.h fix: Remove unused import of windows.h Feb 28, 2025
@rotu
Copy link
Contributor Author

rotu commented Feb 28, 2025

Note this may not fully fix the issue in some cases. electron-gyp is still injecting windows.h for me via .electron-gyp\34.0.0\include\node\v8-internal.h. This might also be because @electron/rebuild is pulling in an old node-gyp per electron/rebuild#1157.

  C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.43.34808\bin\HostX64\x64\CL.exe /c /I"C:\Users\dan\.electron-gyp\34.0.0\include\node" /I"C:\Users\dan\.electron-gyp\34.0.0\src" /I"C:\Users\dan\.electron-gyp\34.0.0\deps\openssl\config" /I"C:\Users\dan\.electron-gyp\34.0.0\deps\openssl\openssl\include" /I"C:\Users\dan\.electron-gyp\34.0.0\deps\uv\include" /I"C:\Users\dan\.electron-gyp\34.0.0\deps\zlib" /I"C:\Users\dan\.electron-gyp\34.0.0\deps\v8\include" /I"..\node_modules\node-addon-api" /Z7 /nologo /W3 /WX- /diagnostics:column /MP /Ox /Ob2 /Oi /Ot /Oy /GL /D NODE_GYP_MODULE_NAME=bindings /D USING_UV_SHARED=1 /D USING_V8_SHARED=1 /D V8_DEPRECATION_WARNINGS=1 /D _GLIBCXX_USE_CXX11_ABI=1 /D ELECTRON_ENSURE_CONFIG_GYPI /D USING_ELECTRON_CONFIG_GYPI /D V8_COMPRESS_POINTERS /D V8_COMPRESS_POINTERS_IN_ISOLATE_CAGE /D V8_31BIT_SMIS_ON_64BIT_ARCH /D V8_ENABLE_SANDBOX /D WIN32 /D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE /D _HAS_EXCEPTIONS=0 /D OPENSSL_NO_PINSHARED /D OPENSSL_THREADS /D OPENSSL_NO_ASM /D NAPI_CPP_EXCEPTIONS /D CHECK_NODE_MODULE_VERSION /D BUILDING_NODE_EXTENSION /D "HOST_BINARY=\"node.exe\"" /D _WINDLL /GF /Gm- /EHsc /MT /GS /Gy /fp:precise /Zc:wchar_t /Zc:forScope /Zc:inline /GR- /Fo"Release\obj\bindings\\src\serialport.obj" /Fd"Release\obj\bindings\vc143.pdb" /external:W3 /Gd /TP /wd4530 /wd4506 /wd4351 /wd4355 /wd4800 /wd4251 /wd4275 /wd4244 /wd4267 /FC /errorReport:queue /Zc:__cplusplus -std:c++20 ..\src\serialport.cpp
  serialport.cpp
C:\Users\dan\.electron-gyp\34.0.0\include\node\v8-internal.h(127,67): warning C4003: not enough arguments for function-like macro invocation 'max' [<REDACTED>\node_modules\serialport-bindings-cpp\build\bindings.vcxproj]
  (compiling source file '../src/serialport.cpp')

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Error: node-gyp failed to rebuild 'xxxxx/@serialport\bindings-cpp'
1 participant