Node/C + + expansion module build failed.

Source: Internet
Author: User

"Simple Nodejs Pauling" Example C + + extension Module

hello.cc

#include <node.h> #include <v8.h>using namespace V8; Handle<value> SayHello (const arguments& args) {handlescope Scope;return scope. Close (String::new ("Hello world!"));} void Init_hello (handle<object> target) {Target->set (String::newsymbol ("SayHello"), Functiontemplate::new ( SayHello)->getfunction ());} Node_module (Hello, Init_hello)

Binding.gyp

{' Targets ': [{' target_name ': ' Hello ', ' sources ': ['./hello.cc '], ' conditions ': [[' OS = = ' Win ', {' Libraries ': ['- Lnode.lib ']}]}]}

Configure no problem:

C:\wxg\test\nodejs\dll_demoλnode-gyp CONFIGUREGYP Info It worked if it ends with okgyp info using [email protected]g YP info using [email protected] | Win32 | X64gyp info Spawn C:\Python27\python. Exegyp info Spawn args [' e:\\wxg\\git\\nvmw\\v0.12.1\\node_modules\\node-gyp\\gyp\\gyp_main.py ', Gyp info spawn args ' b Inding.gyp ', Gyp info spawn args '-f ', Gyp info spawn args ' MSVs ', Gyp info spawn args '-g ', Gyp info spawn args ' MSVs _version=auto ', Gyp info spawn args '-i ', Gyp info spawn args ' c:\\wxg\\test\\nodejs\\dll_demo\\build\\config.gypi ', Gyp Info Spawn args '-i ', Gyp info spawn args ' e:\\wxg\\git\\nvmw\\v0.12.1\\node_modules\\node-gyp\\addon.gypi ', Gyp info sp Awn args '-i ', Gyp info spawn args ' c:\\users\\wxg\\.node-gyp\\0.12.1\\common.gypi ', Gyp info spawn args '-dlibrary=sh Ared_library ', Gyp info spawn args '-dvisibility=default ', Gyp info spawn args '-dnode_root_dir=c:\\users\\wxg\\.node-gy p\\0.12.1 ', Gyp info spawn args '-dnode_gyp_dir=e:\\wxg\\git\\Nvmw\\v0.12.1\\node_modules\\node-gyp ', Gyp info spawn args '-dnode_lib_file=node.lib ', Gyp info spawn args '-dmodule_ro Ot_dir=c:\\wxg\\test\\nodejs\\dll_demo ', Gyp info spawn args '--depth=. ', Gyp info spawn args '--no-parallel ', Gyp info s Pawn args '--generator-output ', Gyp info spawn args ' c:\\wxg\\test\\nodejs\\dll_demo\\build ', Gyp info spawn args '-go Utput_dir=. '] Gyp Info OK

build failed.

C:\wxg\test\nodejs\dll_demoλnode-gyp BUILDGYP Info It worked if it ends with okgyp info using [Email protected]gyp i NFO using [email protected] | Win32 | X64gyp info Spawn c:\Windows\Microsoft.NET\Framework\v4.0.30319\msbuild.exegyp info spawn args [' Build/binding.sln ', Gyp info spawn args '/clp:verbosity=minimal ', Gyp info spawn args '/nologo ', Gyp info spawn args '/p:configuration=rel Ease Platform=x64 ']vcbuild:error:project file ' C:\wxg\test\nodejs\dll_demo\build\hello.vcproj ' is not found or not a Vali d p roject file. [C:\wxg\test\nodejs\dll_demo\build\binding.sln]gyp err! Build Errorgyp err! Stack Error: ' C:\Windows\Microsoft.NET\Framework\v4.0.30319\msbuild.exe ' failed with exit Code:1gyp err! Stack at Childprocess.onexit (e:\wxg\git\nvmw\v0.12.1\node_modules\node-gyp\lib\build.js:276:23) Gyp ERR! Stack at Childprocess.emit (events.js:110:17) Gyp err! Stack at Process.childprocess._handle.onexit (child_process.js:1067:12) Gyp err! System Windows_NT 6.1.7601gyp err! Command "E:\\wxg\\git\\nvmw\\v0.12.1\\\\node.exe" "e:\\wxg\\git\\nvmw\\v0.12.1\\node_modules\\node-gyp\\bin\\ Node-gyp.js "Build" Gyp err! CWD C:\wxg\test\nodejs\dll_demogyp err! Node-v V0.12.1gyp err! Node-gyp-v V3.2.1gyp err! Not OK

Searched online under: http://www.imooc.com/qadetail/38800, http://stackoverflow.com/questions/32964144/ Gyp-err-stack-error-c-program-files-x86-msbuild-12-0-bin-msbuild-exe-fail,

The most reliable should still be HTTPS://WWW.NPMJS.COM/PACKAGE/NODE-GYP

Windows 7/8:microsoft Visual Studio C + + for Windows Desktop (Express version works well)

However, I haven't installed "Microsoft Visual Studio C + +" and the Studio file is too large to download for a long time. I am looking for a "Microsoft Visual C + + 2013 runtime", installed, no effect on the Internet. This is later downloaded in studio again under verification.

Node/C + + expansion module build failed.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.