samshull / node-proxy

Deprecated: Harmony Proxies in node (no longer needed)
MIT License
162 stars 29 forks source link

LINK : fatal error LNK1104: cannot open file 'LIBCMT.lib' #38

Closed AaronNGray closed 9 years ago

AaronNGray commented 9 years ago

Am getting the following error when building on Windows 8.1 (64 bit) with Visual Studio 2015

LINK : fatal error LNK1104: cannot open file 'LIBCMT.lib' [C:\Users\Aaron\Node.js\node-proxy\build\nodeproxy.vcxproj]

I got a similar error with Visual Studio 2012.

C:\Users\Aaron\Node.js\node-proxy>npm install

> node-proxy@0.8.0 install C:\Users\Aaron\Node.js\node-proxy
> node-gyp configure build

C:\Users\Aaron\Node.js\node-proxy>node "C:\Program Files\nodejs\node_modules\npm
\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" configure build

Building the projects in this solution one at a time. To enable parallel build,
please add the "/m" switch.
LINK : fatal error LNK1104: cannot open file 'LIBCMT.lib' [C:\Users\Aaron\Node.
js\node-proxy\build\nodeproxy.vcxproj]
gyp ERR! build error
gyp ERR! stack Error: `C:\Program Files (x86)\MSBuild\14.0\bin\msbuild.exe` fail
ed with exit code: 1
gyp ERR! stack     at ChildProcess.onExit (C:\Program Files\nodejs\node_modules\
npm\node_modules\node-gyp\lib\build.js:267:23)
gyp ERR! stack     at ChildProcess.emit (events.js:98:17)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:820:
12)
gyp ERR! System Windows_NT 6.2.9200
gyp ERR! command "node" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modu
les\\node-gyp\\bin\\node-gyp.js" "configure" "build"
gyp ERR! cwd C:\Users\Aaron\Node.js\node-proxy
gyp ERR! node -v v0.10.35
gyp ERR! node-gyp -v v1.0.1
gyp ERR! not ok

npm ERR! node-proxy@0.8.0 install: `node-gyp configure build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the node-proxy@0.8.0 install script.
npm ERR! This is most likely a problem with the node-proxy package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node-gyp configure build
npm ERR! You can get their info via:
npm ERR!     npm owner ls node-proxy
npm ERR! There is likely additional logging output above.
npm ERR! System Windows_NT 6.2.9200
npm ERR! command "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Files\\nod
ejs\\node_modules\\npm\\bin\\npm-cli.js" "install"
npm ERR! cwd C:\Users\Aaron\Node.js\node-proxy
npm ERR! node -v v0.10.35
npm ERR! npm -v 1.4.28
npm ERR! code ELIFECYCLE
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR!     C:\Users\Aaron\Node.js\node-proxy\npm-debug.log
npm ERR! not ok code 0
samshull commented 9 years ago

I just googled cannot open file 'LIBCMT.lib' and I found this so question that implies that you are running this from a prompt that does not have all the environment variables set. I am unfamiliar with windows environments though.

AaronNGray commented 9 years ago

I tried a) running vcvarsall.bat before building on command line b) building the project using Visual Studio 2015

And am getting the same error. LIBCMT.LIB which is the standard Multithreaded, static linking library chosen using /MT C++ compiler option. Normal /MT based projects build okay, on my machine.

So its got to be something to do with node-gyp's generation of the project file as far as I can tell.

AaronNGray commented 9 years ago

Okay it only works with Visual Studio 2012 or 2013 !