-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Please update gyp to add support for Visual Studio 2013 #339
Comments
Repro Case: Windows 7 x64 computer with Visual Studio Express 2013 for Windows Desktop |
Repro Case: Windows 8.1 x64 with Visual Studio Professional 2013. Unable to compile node-spatialite. Warning: for VCCLCompilerTool/CompileAs, invalid literal for int() with base 10: |
Installing Microsoft Visual Studio C++ 2012 for Windows Desktop Express Edition fixes this. It would be nice to not have this dependency however. |
Hi, I've managed to compile node-sqlserver on Windows 8.1. First I've tried Windows SDK for 8.1, but there was a problem with finding VCBuild.exec by msbuild.exe. Then I've added the VS 2013 Desktop Express. It fixed the issue with VCBuild.exe but then I received the below error: C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\Microsoft.Cpp.Platform.targets(64,5): error MSB8020: The build tools for Visual Studio 2010 (Platform Toolset = 'v100') cannot be found. I've changed the MSVSversion.py file by adding almost the same configurations as for VS 2012 (in several places; as in https://code.google.com/p/gyp/source/browse/trunk/pylib/gyp/MSVSVersion.py?spec=svn1763&r=1725) and this allowed to make a build. Anybody knows if those changes are all needed. If yes, I'll provide a patch (pull request), so it will work without moving the whole gyp (as I read above it is not currently easy to move it to node-gyp). |
In R1776, gyp fixes the remaining issue in VS 2013 support. Should be good to go for an update a this point. |
Works beautifully, thank you. |
Still have to explicitly specify Platform: Windows 8.1 x64, Visual Studio 2013, node 0.10.32, node-gyp 1.0.2 |
Updated Note that you also have to update the Now, However, the native modules still won't build, giving an error that some include files are missing (ones from Windows SDK, like say To build with just the stock VS 2013, you need to change what toolset is being selected. You can do that by modifying
Voila - now the native npm modules will compile with the stock Visual Studio 2013 install! |
@gimelfarb Thanks a lot! I followed your instructions and in finally worked! 👍 |
What path does ~/.node-gyp correspond to on Windows? |
@voltagex |
For me, .node-gyp doesn't have common.gypi. A subfolder, 0.12.3, does - but that file doesn't contain the line with "msbuild_toolset". This is after I removed and reinstalled, my node-gyp version is 1.0.3, installed globally... I know this is closed, but it just doesn't seem resolved - I have VS 2013, installed the latest version, and it doesn't work.. is there anything else I can try? I get simply: C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.Cpp.Platform.targets(55,5): error MSB8020: The build tools for Visual Studio 2010 (Platform Toolset = 'v100') cannot be found. To build using the v100 build tools, please install Visual Studio 2010 build tools. Alternatively, you may upgrade to the current Visual Studio tools by selecting the Project menu or right-click the solution, and then selecting "Retarget solution". [D:....\node_modules\nightmare\node_modules\phantom\node_modules\dnode\node_modules\weak\build\weakref.vcxproj] |
@kierenj did you follow the instructions posted earlier detailing how to re-install node-gyp. Solved my issue, I was getting the same as you. |
In the end after posting here a colleague told me to try setting the environment variable GYP_MSVS_VERSION to 2013, which worked instantly. Yours may work too keith thanks, but I'd suggest others with the problem could try "setx GYP_MSVS_VERSION 2013 /M" from an admin command prompt / PowerShell too :) |
https://code.google.com/p/gyp/source/detail?spec=svn1763&r=1725
I've started down this path and found I could not simply swap in gyp r1725 as the calling convention seems to have changed. I started modifying configure.js and node-gyp.js and found myself spiralling inward.
I will attempt to patch by bringing in the updated gyp files that add VS 2013 support without bringing in all updates to gyp.
While reviewing the gyp changes, I also noticed that support for --msvs_version has been dropped from newer versions of gyp.
The text was updated successfully, but these errors were encountered: