Comments (3)
If I ignore this error, then compile my project, build command will error, rebuild success.
Try again the configure or build command not with error.
from cmake-js.
All Logs
PS D:\codes\nan-iccard> yarn configure
yarn run v1.22.19
$ cmake-js configure
info find VS using VS2022 (17.4.33403.182) found at:
info find VS "C:\Program Files\Microsoft Visual Studio\2022\Community"
info find VS run with --verbose for detailed information
info TOOL Using Visual Studio 17 2022 generator.
info CMD CONFIGURE
info RUN 'Visual Studio 17 2022',
info RUN '-A',
info RUN 'Win32',
info RUN '-DCMAKE_JS_VERSION=7.2.1',
info RUN '-DCMAKE_BUILD_TYPE=Release',
info RUN '-DCMAKE_RUNTIME_OUTPUT_DIRECTORY=D:\\codes\\nan-iccard\\build',
info RUN '-DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreaded$<$<CONFIG:Debug>:Debug>',
info RUN '-DCMAKE_JS_INC=C:\\Users\\layne\\.cmake-js\\node-ia32\\v18.14.0\\include\\node;D:\\codes\\nan-iccard\\node_modules\\nan',
info RUN '-DCMAKE_JS_SRC=D:/codes/nan-iccard/node_modules/cmake-js/lib/cpp/win_delay_load_hook.cc',
info RUN '-DNODE_RUNTIME=node',
info RUN '-DNODE_RUNTIMEVERSION=18.14.0',
info RUN '-DNODE_ARCH=ia32',
info RUN '-DCMAKE_JS_LIB=C:\\Users\\layne\\.cmake-js\\node-ia32\\v18.14.0\\win-x86\\node.lib',
info RUN '-DCMAKE_SHARED_LINKER_FLAGS=/DELAYLOAD:NODE.EXE /SAFESEH:NO'
info RUN ]
Not searching for unused variables given on the command line.
CMake Error: Error: generator platform: Win32
Does not match the platform used previously: win32
Either remove the CMakeCache.txt file and CMakeFiles directory or choose a different binary directory.
ERR! OMG Process terminated: 1
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
PS D:\codes\nan-iccard> yarn build
yarn run v1.22.19
$ cmake-js compile
info find VS using VS2022 (17.4.33403.182) found at:
info find VS "C:\Program Files\Microsoft Visual Studio\2022\Community"
info find VS run with --verbose for detailed information
info TOOL Using Visual Studio 17 2022 generator.
info CMD BUILD
info RUN [
info RUN 'cmake',
info RUN '--build',
info RUN 'D:\\codes\\nan-iccard\\build',
info RUN '--config',
info RUN 'Release'
info RUN ]
MSBuild version 17.4.1+9a89d02ff for .NET Framework
Checking Build System
Building Custom Rule D:/codes/nan-iccard/CMakeLists.txt
addon.cc
D:\codes\nan-iccard\src\addon.cc(1,10): fatal error C1083: 无法打开包括文件: “nan.h”: No such file or directory [D:\codes\nan-iccard\build\iccard.vcxproj]
iccard.cc
D:\codes\nan-iccard\src\iccard.h(4,10): fatal error C1083: 无法打开包括文件: “nan.h”: No such file or directory [D:\codes\nan-iccard\build\iccard.vcxproj]
正在生成代码...
info REP Build has been failed, trying to do a full rebuild.
info CMD CLEAN
info RUN [ 'cmake', '-E', 'remove_directory', 'D:\\codes\\nan-iccard\\build' ]
info CMD CONFIGURE
info find VS using VS2022 (17.4.33403.182) found at:
info find VS "C:\Program Files\Microsoft Visual Studio\2022\Community"
info find VS run with --verbose for detailed information
info RUN [
info RUN 'cmake',
info RUN 'D:\\codes\\nan-iccard',
info RUN '--no-warn-unused-cli',
info RUN '-G',
info RUN 'Visual Studio 17 2022',
info RUN '-A',
info RUN 'Win32',
info RUN '-DCMAKE_JS_VERSION=7.2.1',
info RUN '-DCMAKE_BUILD_TYPE=Release',
info RUN '-DCMAKE_RUNTIME_OUTPUT_DIRECTORY=D:\\codes\\nan-iccard\\build',
info RUN '-DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreaded$<$<CONFIG:Debug>:Debug>',
info RUN '-DCMAKE_JS_INC=C:\\Users\\layne\\.cmake-js\\node-ia32\\v18.14.0\\include\\node;D:\\codes\\nan-iccard\\node_modules\\nan',
info RUN '-DCMAKE_JS_SRC=D:/codes/nan-iccard/node_modules/cmake-js/lib/cpp/win_delay_load_hook.cc',
info RUN '-DNODE_RUNTIME=node',
info RUN '-DNODE_RUNTIMEVERSION=18.14.0',
info RUN '-DNODE_ARCH=ia32',
info RUN '-DCMAKE_JS_LIB=C:\\Users\\layne\\.cmake-js\\node-ia32\\v18.14.0\\win-x86\\node.lib',
info RUN '-DCMAKE_SHARED_LINKER_FLAGS=/DELAYLOAD:NODE.EXE /SAFESEH:NO'
info RUN ]
Not searching for unused variables given on the command line.
-- Selecting Windows SDK version 10.0.22000.0 to target Windows 10.0.22621.
-- The C compiler identification is MSVC 19.34.31942.0
-- The CXX compiler identification is MSVC 19.34.31942.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.34.31933/bin/Hostx64/x86/cl.exe - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.34.31933/bin/Hostx64/x86/cl.exe - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-------------- CMAKE_JS_INC: C:\Users\layne\.cmake-js\node-ia32\v18.14.0\include\node;D:\codes\nan-iccard\node_modules\nan
-------------- CMAKE_BUILD_TYPE: Release
-------------- CMAKE_CURRENT_SOURCE_DIR: D:/codes/nan-iccard
-------------- CMAKE_CURRENT_BINARY_DIR: D:/codes/nan-iccard/build
-- Configuring done
-- Generating done
-- Build files have been written to: D:/codes/nan-iccard/build
info CMD BUILD
info RUN [
info RUN 'cmake',
info RUN '--build',
info RUN 'D:\\codes\\nan-iccard\\build',
info RUN '--config',
info RUN 'Release'
info RUN ]
MSBuild version 17.4.1+9a89d02ff for .NET Framework
Checking Build System
Building Custom Rule D:/codes/nan-iccard/CMakeLists.txt
addon.cc
iccard.cc
正在生成代码...
正在创建库 D:/codes/nan-iccard/build/Release/iccard.lib 和对象 D:/codes/nan-iccard/build/Release/iccard.exp
iccard.vcxproj -> D:\codes\nan-iccard\build\Release\iccard.node
Building Custom Rule D:/codes/nan-iccard/CMakeLists.txt
Done in 4.12s.
PS D:\codes\nan-iccard> yarn configure
yarn run v1.22.19
$ cmake-js configure
info find VS using VS2022 (17.4.33403.182) found at:
info find VS "C:\Program Files\Microsoft Visual Studio\2022\Community"
info find VS run with --verbose for detailed information
info TOOL Using Visual Studio 17 2022 generator.
info CMD CONFIGURE
info find VS using VS2022 (17.4.33403.182) found at:
info find VS "C:\Program Files\Microsoft Visual Studio\2022\Community"
info find VS run with --verbose for detailed information
info RUN [
info RUN 'cmake',
info RUN 'D:\\codes\\nan-iccard',
info RUN '--no-warn-unused-cli',
info RUN '-G',
info RUN 'Visual Studio 17 2022',
info RUN '-A',
info RUN 'Win32',
info RUN '-DCMAKE_JS_VERSION=7.2.1',
info RUN '-DCMAKE_BUILD_TYPE=Release',
info RUN '-DCMAKE_RUNTIME_OUTPUT_DIRECTORY=D:\\codes\\nan-iccard\\build',
info RUN '-DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreaded$<$<CONFIG:Debug>:Debug>',
info RUN '-DCMAKE_JS_INC=C:\\Users\\layne\\.cmake-js\\node-ia32\\v18.14.0\\include\\node;D:\\codes\\nan-iccard\\node_modules\\nan',
info RUN '-DCMAKE_JS_SRC=D:/codes/nan-iccard/node_modules/cmake-js/lib/cpp/win_delay_load_hook.cc',
info RUN '-DNODE_RUNTIME=node',
info RUN '-DNODE_RUNTIMEVERSION=18.14.0',
info RUN '-DNODE_ARCH=ia32',
info RUN '-DCMAKE_JS_LIB=C:\\Users\\layne\\.cmake-js\\node-ia32\\v18.14.0\\win-x86\\node.lib',
info RUN '-DCMAKE_SHARED_LINKER_FLAGS=/DELAYLOAD:NODE.EXE /SAFESEH:NO'
info RUN ]
Not searching for unused variables given on the command line.
-- Selecting Windows SDK version 10.0.22000.0 to target Windows 10.0.22621.
-------------- CMAKE_JS_INC: C:\Users\layne\.cmake-js\node-ia32\v18.14.0\include\node;D:\codes\nan-iccard\node_modules\nan
-------------- CMAKE_BUILD_TYPE: Release
-------------- CMAKE_CURRENT_SOURCE_DIR: D:/codes/nan-iccard
-------------- CMAKE_CURRENT_BINARY_DIR: D:/codes/nan-iccard/build
-- Configuring done
-- Generating done
-- Build files have been written to: D:/codes/nan-iccard/build
Done in 0.70s.
PS D:\codes\nan-iccard> yarn build
yarn run v1.22.19
$ cmake-js compile
info find VS using VS2022 (17.4.33403.182) found at:
info find VS "C:\Program Files\Microsoft Visual Studio\2022\Community"
info find VS run with --verbose for detailed information
info TOOL Using Visual Studio 17 2022 generator.
info CMD BUILD
info RUN [
info RUN 'cmake',
info RUN '--build',
info RUN 'D:\\codes\\nan-iccard\\build',
info RUN '--config',
info RUN 'Release'
info RUN ]
MSBuild version 17.4.1+9a89d02ff for .NET Framework
Checking Build System
Building Custom Rule D:/codes/nan-iccard/CMakeLists.txt
iccard.vcxproj -> D:\codes\nan-iccard\build\Release\iccard.node
Building Custom Rule D:/codes/nan-iccard/CMakeLists.txt
Done in 0.78s.
PS D:\codes\nan-iccard> yarn clean
yarn run v1.22.19
$ cmake-js clean
info find VS using VS2022 (17.4.33403.182) found at:
info find VS "C:\Program Files\Microsoft Visual Studio\2022\Community"
info find VS run with --verbose for detailed information
info TOOL Using Visual Studio 17 2022 generator.
info CMD CLEAN
info RUN [ 'cmake', '-E', 'remove_directory', 'D:\\codes\\nan-iccard\\build' ]
Done in 0.42s.
PS D:\codes\nan-iccard> yarn configure
yarn run v1.22.19
$ cmake-js configure
info find VS using VS2022 (17.4.33403.182) found at:
info find VS "C:\Program Files\Microsoft Visual Studio\2022\Community"
info find VS run with --verbose for detailed information
info TOOL Using Visual Studio 17 2022 generator.
info CMD CONFIGURE
info find VS using VS2022 (17.4.33403.182) found at:
info find VS "C:\Program Files\Microsoft Visual Studio\2022\Community"
info find VS run with --verbose for detailed information
info RUN [
info RUN 'cmake',
info RUN 'D:\\codes\\nan-iccard',
info RUN '--no-warn-unused-cli',
info RUN '-G',
info RUN 'Visual Studio 17 2022',
info RUN '-A',
info RUN 'Win32',
info RUN '-DCMAKE_JS_VERSION=7.2.1',
info RUN '-DCMAKE_BUILD_TYPE=Release',
info RUN '-DCMAKE_RUNTIME_OUTPUT_DIRECTORY=D:\\codes\\nan-iccard\\build',
info RUN '-DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreaded$<$<CONFIG:Debug>:Debug>',
info RUN '-DCMAKE_JS_INC=C:\\Users\\layne\\.cmake-js\\node-ia32\\v18.14.0\\include\\node;D:\\codes\\nan-iccard\\node_modules\\nan',
info RUN '-DCMAKE_JS_SRC=D:/codes/nan-iccard/node_modules/cmake-js/lib/cpp/win_delay_load_hook.cc',
info RUN '-DNODE_RUNTIME=node',
info RUN '-DNODE_RUNTIMEVERSION=18.14.0',
info RUN '-DNODE_ARCH=ia32',
info RUN '-DCMAKE_JS_LIB=C:\\Users\\layne\\.cmake-js\\node-ia32\\v18.14.0\\win-x86\\node.lib',
info RUN '-DCMAKE_SHARED_LINKER_FLAGS=/DELAYLOAD:NODE.EXE /SAFESEH:NO'
info RUN ]
Not searching for unused variables given on the command line.
-- Selecting Windows SDK version 10.0.22000.0 to target Windows 10.0.22621.
-- The C compiler identification is MSVC 19.34.31942.0
-- The CXX compiler identification is MSVC 19.34.31942.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.34.31933/bin/Hostx64/x86/cl.exe - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.34.31933/bin/Hostx64/x86/cl.exe - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-------------- CMAKE_JS_INC: C:\Users\layne\.cmake-js\node-ia32\v18.14.0\include\node;D:\codes\nan-iccard\node_modules\nan
-------------- CMAKE_BUILD_TYPE: Release
-------------- CMAKE_CURRENT_SOURCE_DIR: D:/codes/nan-iccard
-------------- CMAKE_CURRENT_BINARY_DIR: D:/codes/nan-iccard/build
-- Configuring done
-- Generating done
-- Build files have been written to: D:/codes/nan-iccard/build
Done in 2.46s.
from cmake-js.
CMakeLists.txt
cmake_minimum_required(VERSION 3.24)
cmake_policy(SET CMP0091 NEW)
cmake_policy(SET CMP0042 NEW)
project (iccard)
set(CMAKE_C_FLAGS "-m32")
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
add_definitions(-DNAPI_VERSION=8)
message("-------------- CMAKE_JS_INC: ${CMAKE_JS_INC}")
message("-------------- CMAKE_BUILD_TYPE: ${CMAKE_BUILD_TYPE}")
message("-------------- CMAKE_CURRENT_SOURCE_DIR: ${CMAKE_CURRENT_SOURCE_DIR}")
message("-------------- CMAKE_CURRENT_BINARY_DIR: ${CMAKE_CURRENT_BINARY_DIR}")
include_directories(${CMAKE_JS_INC})
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/bc750)
link_directories(${CMAKE_CURRENT_SOURCE_DIR}/bc750)
file(GLOB SOURCE_FILES "src/*.h" "src/*.c" "src/*.cc" "bc750/*.h")
file(GLOB DLL_FILES "bc750/*.dll")
file(COPY ${DLL_FILES} DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_BUILD_TYPE})
add_library(${PROJECT_NAME} SHARED ${SOURCE_FILES})
set_target_properties(${PROJECT_NAME} PROPERTIES PREFIX "" SUFFIX ".node")
target_link_libraries(${PROJECT_NAME} ${CMAKE_JS_LIB} hfrdapi)
if(MSVC AND CMAKE_JS_NODELIB_DEF AND CMAKE_JS_NODELIB_TARGET)
execute_process(COMMAND ${CMAKE_AR} /def:${CMAKE_JS_NODELIB_DEF} /out:${CMAKE_JS_NODELIB_TARGET} ${CMAKE_STATIC_LINKER_FLAGS})
endif()
from cmake-js.
Related Issues (20)
- Electron not auto detected and runtime fail HOT 2
- Failure to parse package.json (containing trailing commas) is not reported HOT 3
- node-datachannel uses cmake-js HOT 1
- Cannot open include file: 'napi.h' HOT 7
- cmake-js v8 ideas HOT 18
- Problem with clang-cl toolchain on windows (and solution) HOT 1
- print-configure doesn't respect -o (specifying build directory)
- Values passed via `--CD` gets incorrectly converted to numbers
- CMake/ninja error: '**/System/Library/Frameworks/CoreAudio.framework/CoreAudio', needed by 'Release/addon.node', missing and no known rule to make it
- Error while executing the `rebuild` command HOT 2
- Builds fail in bash on Windows (PATH vs Path)
- Dull on windows after while HOT 2
- Failing to resolve node_api.h with Microsoft intellisense in Visual Studio Code HOT 2
- Add a c version of win_delay_load_hook
- ERR! OMG There is no Visual C++ compiler installed. Install Visual C++ Build Toolset or Visual Studio.
- use cmake-js without msvc
- include arm64 in release
- Having 'nan' in node_modules causes error with string sub-command FIND
- Consider introducing a CMake module
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cmake-js.