Skip to content
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

CMake Error: Could not create named generator Visual Studio 15 2017 Win64 Win64 #283

Open
ouydon opened this issue Mar 14, 2019 · 3 comments

Comments

@ouydon
Copy link

ouydon commented Mar 14, 2019

use electron-quick-start add napajs

D:\project> node -v
v10.15.3

download https://github.com/Kitware/CMake/releases/download/v3.14.0-rc4/cmake-3.14.0-rc4-win64-x64.msi
install cmake

D:\project>cmake -version
cmake version 3.14.0-rc4

D:\project>npm install -g cmake-js
D:\project>cmake-js --version

[ 'D:\Program Files\nodejs\node.exe',
'C:\Users\MyPC\AppData\Roaming\npm\node_modules\cmake-js\bin\cmake-js',
'--version' ]
5.1.0

D:\project> git clone https://github.com/electron/electron-quick-start
D:\project> cd electron-quick-start
D:\project\electron-quick-start> npm install
D:\project\electron-quick-start> npm install napajs --save

goto https://visualstudio.microsoft.com/downloads/#build-tools-for-visual-studio-2017 websize
image

D:\project\electron-quick-start>cd node_modules\napajs\

package.json

{
"_from": "napajs",
"_id": "[email protected]",
"_inBundle": false,
"_integrity": "sha512-42KQsVd8rUBs8+OtUh99R0ID5+u0895XMITgfRdmKxvhV1p9zo41gX/J5yxwONpTJfMyALGh62WiN4CmSXaMIw==",
"_location": "/napajs",
"_phantomChildren": {},
"_requested": {
"type": "tag",
"registry": true,
"raw": "napajs",
"name": "napajs",
"escapedName": "napajs",
"rawSpec": "",
"saveSpec": null,
"fetchSpec": "latest"
},
"_requiredBy": [
"#USER",
"/"
],
"_resolved": "https://registry.npmjs.org/napajs/-/napajs-0.2.3.tgz",
"_shasum": "51b3f946f0b517ea73915c48c9b9b93a5971e8c4",
"_spec": "napajs",
"_where": "D:\project\electron-quick-start",
"author": {
"name": "napajs"
},
"binary": {
"module_name": "napa-binding",
"module_path": "./bin/",
"host": "https://github.com/Microsoft/napajs/releases/download/",
"remote_path": "{version}"
},
"bugs": {
"url": "https://github.com/Microsoft/napajs/issues"
},
"bundleDependencies": false,
"dependencies": {
"node-pre-gyp": "^0.6.36",
"npmlog": "^4.1.2",
"semver": "^5.5.0"
},
"deprecated": false,
"description": "Napa.js is a multi-threaded JavaScript runtime built on V8",
"devDependencies": {
"@types/mocha": "^2.2.41",
"@types/node": "^8.0.22",
"markdown-table": "^1.1.1",
"mocha": "^3.5.0",
"node-pre-gyp-github": "^1.3.1",
"typescript": "^2.4.2"
},
"homepage": "https://github.com/Microsoft/napajs#readme",
"license": "MIT",
"main": "./lib/index.js",
"name": "napajs",
"repository": {
"type": "git",
"url": "git+https://github.com/Microsoft/napajs.git"
},
"cmake-js": {
"runtime": "electron",
"runtimeVersion": "4.0.7",
"arch": "x64"
},

"scripts": {
"benchmark": "node benchmark/bench.js",
"install": "node scripts/install.js",
"prepare": "tsc -p lib && tsc -p test && tsc -p benchmark",
"rebuild": "cmake-js rebuild && tsc -p lib",
"rebuildd": "cmake-js rebuild --debug && tsc -p lib",
"retest": "cmake-js rebuild -d test/module/addon && tsc -p test && mocha test --recursive",
"reunittest": "cmake-js rebuild -d unittest && node unittest/run.js",
"test": "mocha test -g "^((?!napajs/timers).)*$" --recursive && mocha test -g "^napajs/timers"",
"unittest": "cmake-js compile -d unittest && node unittest/run.js"
},
"types": "./types/index.d.ts",
"version": "0.2.3"
}

================================================

D:\project\electron-quick-start\node_modules\napajs> cmake-js rebuild

[ 'D:\Program Files\nodejs\node.exe',
'C:\Users\MyPC\AppData\Roaming\npm\node_modules\cmake-js\bin\cmake-js',
'rebuild' ]
info TOOL Using Visual Studio 15 2017 Win64 Win64 generator.
info CMD CLEAN
info RUN cmake -E remove_directory "D:\project\electron-quick-start\node_modules\napajs\build"
info CMD CONFIGURE
info RUN cmake "D:\project\electron-quick-start\node_modules\napajs" --no-warn-unused-cli -G"Visual Studio 15 2017 Win64 Win64" -DCMAKE_JS_VERSION="5.1.0" -DCMAKE_BUILD_TYPE="Release" -DCMAKE_RUNTIME_OUTPUT_DIRECTORY="D:\project\electron-quick-start\node_modules\napajs\build" -DCMAKE_JS_INC="C:\Users\MyPC.cmake-js\electron-x64\v4.0.7\include\node" -DNODE_RUNTIME="electron" -DNODE_RUNTIMEVERSION="4.0.7" -DNODE_ARCH="x64" -DCMAKE_JS_LIB="C:\Users\MyPC.cmake-js\electron-x64\v4.0.7\x64\node.lib"
Not searching for unused variables given on the command line.
CMake Error: Could not create named generator Visual Studio 15 2017 Win64 Win64

Generators
Visual Studio 16 2019 = Generates Visual Studio 2019 project files.
Use -A option to specify architecture.

  • Visual Studio 15 2017 [arch] = Generates Visual Studio 2017 project files.
    Optional [arch] can be "Win64" or "ARM".
    Visual Studio 14 2015 [arch] = Generates Visual Studio 2015 project files.
    Optional [arch] can be "Win64" or "ARM".
    Visual Studio 12 2013 [arch] = Generates Visual Studio 2013 project files.
    Optional [arch] can be "Win64" or "ARM".
    Visual Studio 11 2012 [arch] = Generates Visual Studio 2012 project files.
    Optional [arch] can be "Win64" or "ARM".
    Visual Studio 10 2010 [arch] = Generates Visual Studio 2010 project files.
    Optional [arch] can be "Win64" or "IA64".
    Visual Studio 9 2008 [arch] = Generates Visual Studio 2008 project files.
    Optional [arch] can be "Win64" or "IA64".
    Borland Makefiles = Generates Borland makefiles.
    NMake Makefiles = Generates NMake makefiles.
    NMake Makefiles JOM = Generates JOM makefiles.
    Green Hills MULTI = Generates Green Hills MULTI files
    (experimental, work-in-progress).
    MSYS Makefiles = Generates MSYS makefiles.
    MinGW Makefiles = Generates a make file for use with
    mingw32-make.
    Unix Makefiles = Generates standard UNIX makefiles.
    Ninja = Generates build.ninja files.
    Watcom WMake = Generates Watcom WMake makefiles.
    CodeBlocks - MinGW Makefiles = Generates CodeBlocks project files.
    CodeBlocks - NMake Makefiles = Generates CodeBlocks project files.
    CodeBlocks - NMake Makefiles JOM
    = Generates CodeBlocks project files.
    CodeBlocks - Ninja = Generates CodeBlocks project files.
    CodeBlocks - Unix Makefiles = Generates CodeBlocks project files.
    CodeLite - MinGW Makefiles = Generates CodeLite project files.
    CodeLite - NMake Makefiles = Generates CodeLite project files.
    CodeLite - Ninja = Generates CodeLite project files.
    CodeLite - Unix Makefiles = Generates CodeLite project files.
    Sublime Text 2 - MinGW Makefiles
    = Generates Sublime Text 2 project files.
    Sublime Text 2 - NMake Makefiles
    = Generates Sublime Text 2 project files.
    Sublime Text 2 - Ninja = Generates Sublime Text 2 project files.
    Sublime Text 2 - Unix Makefiles
    = Generates Sublime Text 2 project files.
    Kate - MinGW Makefiles = Generates Kate project files.
    Kate - NMake Makefiles = Generates Kate project files.
    Kate - Ninja = Generates Kate project files.
    Kate - Unix Makefiles = Generates Kate project files.
    Eclipse CDT4 - NMake Makefiles
    = Generates Eclipse CDT 4.0 project files.
    Eclipse CDT4 - MinGW Makefiles
    = Generates Eclipse CDT 4.0 project files.
    Eclipse CDT4 - Ninja = Generates Eclipse CDT 4.0 project files.
    Eclipse CDT4 - Unix Makefiles= Generates Eclipse CDT 4.0 project files.

ERR! OMG Process terminated: 1

Ask each master to help see this problem, thank you.

@fs-eire
Copy link
Contributor

fs-eire commented Mar 14, 2019

This is a known issue of cmake-js: cmake-js/cmake-js#160

A quick fix is appending this in the cmake-js cmdline: -G"Visual Studio 15 2017 Win64"

@ouydon
Copy link
Author

ouydon commented Mar 14, 2019

@fs-eire Thank you very much!

@CarlCornelio
Copy link

I HAD THE SAME ISSUE. But my problem was, I had Cygwin installed, and Cygwin had their own built-in version of C-make. What I did was- untie Cygwin from my command prompt (cmd), then rebuilt it. It then worked. Make sure you don't have something tied into your command prompt (cmd), like Cygwin, because they have their own version of 'Cmake'.

One way of checking this out is by typing in 'cygwin' into your command prompt (cmd), or into your search, and try tracing its file origin, and try removing its ties from command prompt, or by just uninstalling the app which utilizes a different version of Cmake.

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

No branches or pull requests

3 participants