Installation fails with Microsoft Visual Studio 2015
Installation does not work using MSVS 2015.
C:\Users\Michael\Github\javascript\justlogin.xyz>npm i [email protected]
npm WARN installMany node-pre-gyp was bundled with [email protected], but bundled package wasn\'t found in unpacked tree
> [email protected] install C:\Users\Michael\Github\javascript\justlogin.xyz\node_modules\leveldown
> node-pre-gyp install --fallback-to-build
C:\Users\Michael\Github\javascript\justlogin.xyz\node_modules\leveldown>if not defined npm_config_node_gyp (node "C:\Users\Michael\AppData\Roaming\nvm\v0.12.5\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" clean ) else (node clean )
C:\Users\Michael\Github\javascript\justlogin.xyz\node_modules\leveldown>if not defined npm_config_node_gyp (node "C:\Users\Michael\AppData\Roaming\nvm\v0.12.5\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" configure --fallback-to-build --module=C:\Users\Michael\Github\javascript\justlogin.xyz\node_modules\leveldown\build-pre-gyp\leveldown.node --module_name=leveldown --module_path=C:\Users\Michael\Github\javascript\justlogin.xyz\node_modules\leveldown\build-pre-gyp ) else (node configure --fallback-to-build --module=C:\Users\Michael\Github\javascript\justlogin.xyz\node_modules\leveldown\build-pre-gyp\leveldown.node --module_name=leveldown --module_path=C:\Users\Michael\Github\javascript\justlogin.xyz\node_modules\leveldown\build-pre-gyp )
C:\Users\Michael\Github\javascript\justlogin.xyz\node_modules\leveldown>if not defined npm_config_node_gyp (node "C:\Users\Michael\AppData\Roaming\nvm\v0.12.5\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" build --fallback-to-build --module=C:\Users\Michael\Github\javascript\justlogin.xyz\node_modules\leveldown\build-pre-gyp\leveldown.node
--module_name=leveldown --module_path=C:\Users\Michael\Github\javascript\justlogin.xyz\node_modules\leveldown\build-pre-gyp ) else (node build --fallback-to-build --module=C:\Users\Michael\Github\javascript\justlogin.xyz\node_modules\leveldown\build-pre-gyp\leveldown.node --module_name=leveldown --module_path=C:\Users\Michael\Github\javascript\justlogin.xyz\node_modules\leveldown\build-pre-gyp )
Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch.
builder.cc
db_impl.cc
db_iter.cc
filename.cc
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\cstdint(23): error C2039: 'int_least8_t': is not a member of '`global namespace`' (compiling source file leveldb-1.18.0\db\db_impl.cc) [C:\Users\Michael\Github\javascript\justlogin.xyz\node_modules\leveldown\deps\leveldb\leveldb.vcxproj]
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\cstdint(23): error C2873: 'int_least8_t': symbol cannot be used in a using-declaration (compiling source file leveldb-1.18.0\db\db_impl.cc) [C:\Users\Michael\Github\javascript\justlogin.xyz\node_modules\leveldown\deps\leveldb\leveldb.vcxproj]
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\cstdint(23): error C2039: 'int_least16_t': is not a member of '`global namespace`' (compiling source file leveldb-1.18.0\db\db_impl.cc) [C:\Users\Michael\Github\javascript\justlogin.xyz\node_modules\leveldown\deps\leveldb\leveldb.vcxproj]
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\cstdint(23): error C2873: 'int_least16_t': symbol cannot be used in a using-declaration (compiling source file leveldb-1.18.0\db\db_impl.cc) [C:\Users\Michael\Github\javascript\justlogin.xyz\node_modules\leveldown\deps\leveldb\leveldb.vcxproj]
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\cstdint(24): error C2039: 'int_least32_t': is not a member of '`global namespace`' (compiling source file leveldb-1.18.0\db\db_impl.cc) [C:\Users\Michael\Github\javascript\justlogin.xyz\node_modules\leveldown\deps\leveldb\leveldb.vcxproj]
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\cstdint(24): error C2873: 'int_least32_t': symbol cannot be used in a using-declaration (compiling source file leveldb-1.18.0\db\db_impl.cc) [C:\Users\Michael\Github\javascript\justlogin.xyz\node_modules\leveldown\deps\leveldb\leveldb.vcxproj]
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\cstdint(24): error C2039: 'int_least64_t': is not a member of '`global namespace`' (compiling source file leveldb-1.18.0\db\db_impl.cc) [C:\Users\Michael\Github\javascript\justlogin.xyz\node_modules\leveldown\deps\leveldb\leveldb.vcxproj]
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\cstdint(24): error C2873: 'int_least64_t': symbol cannot be used in a using-declaration (compiling source file leveldb-1.18.0\db\db_impl.cc) [C:\Users\Michael\Github\javascript\justlogin.xyz\node_modules\leveldown\deps\leveldb\leveldb.vcxproj]
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\cstdint(25): error C2039: 'uint_least8_t': is not a member of '`global namespace`' (compiling source file leveldb-1.18.0\db\db_impl.cc) [C:\Users\Michael\Github\javascript\justlogin.xyz\node_modules\leveldown\deps\leveldb\leveldb.vcxproj]
[... you get the idea ...]
Is this due to node-pre-gyp, leveldown, or my configuration?
is it missing a header / stdlib?
Hi @ArtskydJ
Can you confirm the version of node-gyp please
node-gyp -v
According to this https://github.com/TooTallNate/node-gyp/issues/629 v2.0.0 is required for 2015 support.
FYI I think you are running into this issue here http://stackoverflow.com/questions/30928193/visualstudio-2015-rc-issue-with-includes and I am guessing but v2.0.0 caters for that.
I have node-gyp v2.0.2.
Maybe $(IncludePath) needs to be added to leveldown/deps/leveldb/leveldb.vcxproj?
leveldown/deps/leveldb/leveldb.vcxproj is generated by node-gyp
Can you post your leveldown/deps/leveldb/leveldb.vcxproj here to see what has been created compared to a working version.
My gut is we are going to have to tweak the level gyp file somehow
https://github.com/Level/leveldown/blob/master/deps/leveldb/leveldb.gyp#L29
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{6F02BF96-E041-75BC-770B-5DBCE6285C31}</ProjectGuid>
<Keyword>Win32Proj</Keyword>
<RootNamespace>leveldb</RootNamespace>
<IgnoreWarnCompileDuplicatedFilename>true</IgnoreWarnCompileDuplicatedFilename>
<PreferredToolArchitecture>x64</PreferredToolArchitecture>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props"/>
<PropertyGroup Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
</PropertyGroup>
<PropertyGroup Label="Locals">
<PlatformToolset>v140</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props"/>
<Import Project="$(VCTargetsPath)\BuildCustomizations\masm.props"/>
<ImportGroup Label="ExtensionSettings"/>
<ImportGroup Label="PropertySheets">
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"/>
</ImportGroup>
<PropertyGroup Label="UserMacros"/>
<PropertyGroup>
<ExecutablePath>$(ExecutablePath);$(MSBuildProjectDirectory)\.\bin\;$(MSBuildProjectDirectory)\.\bin\</ExecutablePath>
<IntDir>$(Configuration)\obj\$(ProjectName)\</IntDir>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
<OutDir>$(SolutionDir)$(Configuration)\</OutDir>
<TargetName>$(ProjectName)</TargetName>
<TargetPath>$(OutDir)\$(ProjectName)$(TargetExt)</TargetPath>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<AdditionalIncludeDirectories>C:\Users\Michael\.node-gyp\0.12.5\src;C:\Users\Michael\.node-gyp\0.12.5\deps\uv\include;C:\Users\Michael\.node-gyp\0.12.5\deps\v8\include;leveldb-1.17.0;leveldb-1.17.0\include;leveldb-1.17.0\port\win;port-libuv;..\snappy\snappy-1.1.1;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<BufferSecurityCheck>true</BufferSecurityCheck>
<CompileAsWinRT>false</CompileAsWinRT>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<DisableSpecificWarnings>4355;4530;4267;4244;4351;4355;4800;4251;%(DisableSpecificWarnings)</DisableSpecificWarnings>
<ExceptionHandling>Async</ExceptionHandling>
<FunctionLevelLinking>true</FunctionLevelLinking>
<MinimalRebuild>false</MinimalRebuild>
<OmitFramePointers>false</OmitFramePointers>
<Optimization>Disabled</Optimization>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<PreprocessorDefinitions>NODE_GYP_MODULE_NAME=leveldb;WIN32;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;BUILDING_V8_SHARED=1;BUILDING_UV_SHARED=1;SNAPPY=1;LEVELDB_PLATFORM_UV=1;NOMINMAX=1;_HAS_EXCEPTIONS=0;DEBUG;_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<RuntimeTypeInfo>false</RuntimeTypeInfo>
<StringPooling>true</StringPooling>
<SuppressStartupBanner>true</SuppressStartupBanner>
<TreatWarningAsError>false</TreatWarningAsError>
<WarningLevel>Level3</WarningLevel>
</ClCompile>
<Lib>
<OutputFile>$(OutDir)$(ProjectName)$(TargetExt)</OutputFile>
</Lib>
<Link>
<AdditionalDependencies>kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;DelayImp.lib;"C:\Users\Michael\.node-gyp\0.12.5\$(Configuration)\node.lib"</AdditionalDependencies>
<AllowIsolation>true</AllowIsolation>
<DataExecutionPrevention>true</DataExecutionPrevention>
<GenerateDebugInformation>true</GenerateDebugInformation>
<RandomizedBaseAddress>true</RandomizedBaseAddress>
<SuppressStartupBanner>true</SuppressStartupBanner>
<TargetMachine>MachineX86</TargetMachine>
</Link>
<ResourceCompile>
<AdditionalIncludeDirectories>C:\Users\Michael\.node-gyp\0.12.5\src;C:\Users\Michael\.node-gyp\0.12.5\deps\uv\include;C:\Users\Michael\.node-gyp\0.12.5\deps\v8\include;leveldb-1.17.0;leveldb-1.17.0\include;leveldb-1.17.0\port\win;port-libuv;..\snappy\snappy-1.1.1;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>NODE_GYP_MODULE_NAME=leveldb;WIN32;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;BUILDING_V8_SHARED=1;BUILDING_UV_SHARED=1;SNAPPY=1;LEVELDB_PLATFORM_UV=1;NOMINMAX=1;_HAS_EXCEPTIONS=0;DEBUG;_DEBUG;%(PreprocessorDefinitions);%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ResourceCompile>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<AdditionalIncludeDirectories>C:\Users\Michael\.node-gyp\0.12.5\src;C:\Users\Michael\.node-gyp\0.12.5\deps\uv\include;C:\Users\Michael\.node-gyp\0.12.5\deps\v8\include;leveldb-1.17.0;leveldb-1.17.0\include;leveldb-1.17.0\port\win;port-libuv;..\snappy\snappy-1.1.1;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalOptions>/MP %(AdditionalOptions)</AdditionalOptions>
<BufferSecurityCheck>true</BufferSecurityCheck>
<CompileAsWinRT>false</CompileAsWinRT>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<DisableSpecificWarnings>4355;4530;4267;4244;4351;4355;4800;4251;%(DisableSpecificWarnings)</DisableSpecificWarnings>
<ExceptionHandling>false</ExceptionHandling>
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
<FunctionLevelLinking>true</FunctionLevelLinking>
<InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
<IntrinsicFunctions>true</IntrinsicFunctions>
<OmitFramePointers>true</OmitFramePointers>
<Optimization>Full</Optimization>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<PreprocessorDefinitions>NODE_GYP_MODULE_NAME=leveldb;WIN32;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;BUILDING_V8_SHARED=1;BUILDING_UV_SHARED=1;SNAPPY=1;LEVELDB_PLATFORM_UV=1;NOMINMAX=1;_HAS_EXCEPTIONS=0;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<RuntimeTypeInfo>false</RuntimeTypeInfo>
<StringPooling>true</StringPooling>
<SuppressStartupBanner>true</SuppressStartupBanner>
<TreatWarningAsError>false</TreatWarningAsError>
<WarningLevel>Level3</WarningLevel>
<WholeProgramOptimization>true</WholeProgramOptimization>
</ClCompile>
<Lib>
<AdditionalOptions>/LTCG %(AdditionalOptions)</AdditionalOptions>
<OutputFile>$(OutDir)$(ProjectName)$(TargetExt)</OutputFile>
</Lib>
<Link>
<AdditionalDependencies>kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;DelayImp.lib;"C:\Users\Michael\.node-gyp\0.12.5\$(Configuration)\node.lib"</AdditionalDependencies>
<AllowIsolation>true</AllowIsolation>
<DataExecutionPrevention>true</DataExecutionPrevention>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<GenerateDebugInformation>true</GenerateDebugInformation>
<LinkTimeCodeGeneration>UseLinkTimeCodeGeneration</LinkTimeCodeGeneration>
<OptimizeReferences>true</OptimizeReferences>
<RandomizedBaseAddress>true</RandomizedBaseAddress>
<SuppressStartupBanner>true</SuppressStartupBanner>
<TargetMachine>MachineX86</TargetMachine>
</Link>
<ResourceCompile>
<AdditionalIncludeDirectories>C:\Users\Michael\.node-gyp\0.12.5\src;C:\Users\Michael\.node-gyp\0.12.5\deps\uv\include;C:\Users\Michael\.node-gyp\0.12.5\deps\v8\include;leveldb-1.17.0;leveldb-1.17.0\include;leveldb-1.17.0\port\win;port-libuv;..\snappy\snappy-1.1.1;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>NODE_GYP_MODULE_NAME=leveldb;WIN32;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;BUILDING_V8_SHARED=1;BUILDING_UV_SHARED=1;SNAPPY=1;LEVELDB_PLATFORM_UV=1;NOMINMAX=1;_HAS_EXCEPTIONS=0;%(PreprocessorDefinitions);%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ResourceCompile>
</ItemDefinitionGroup>
<ItemGroup>
<None Include="leveldb.gyp"/>
</ItemGroup>
<ItemGroup>
<ClInclude Include="leveldb-1.17.0\db\builder.h"/>
<ClInclude Include="leveldb-1.17.0\db\db_impl.h"/>
<ClInclude Include="leveldb-1.17.0\db\db_iter.h"/>
<ClInclude Include="leveldb-1.17.0\db\filename.h"/>
<ClInclude Include="leveldb-1.17.0\db\dbformat.h"/>
<ClInclude Include="leveldb-1.17.0\db\log_format.h"/>
<ClInclude Include="leveldb-1.17.0\db\log_reader.h"/>
<ClInclude Include="leveldb-1.17.0\db\log_writer.h"/>
<ClInclude Include="leveldb-1.17.0\db\memtable.h"/>
<ClInclude Include="leveldb-1.17.0\db\skiplist.h"/>
<ClInclude Include="leveldb-1.17.0\db\snapshot.h"/>
<ClInclude Include="leveldb-1.17.0\db\table_cache.h"/>
<ClInclude Include="leveldb-1.17.0\db\version_edit.h"/>
<ClInclude Include="leveldb-1.17.0\db\version_set.h"/>
<ClInclude Include="leveldb-1.17.0\db\write_batch_internal.h"/>
<ClInclude Include="leveldb-1.17.0\helpers\memenv\memenv.h"/>
<ClInclude Include="leveldb-1.17.0\include\leveldb\cache.h"/>
<ClInclude Include="leveldb-1.17.0\include\leveldb\comparator.h"/>
<ClInclude Include="leveldb-1.17.0\include\leveldb\db.h"/>
<ClInclude Include="leveldb-1.17.0\include\leveldb\env.h"/>
<ClInclude Include="leveldb-1.17.0\include\leveldb\filter_policy.h"/>
<ClInclude Include="leveldb-1.17.0\include\leveldb\iterator.h"/>
<ClInclude Include="leveldb-1.17.0\include\leveldb\options.h"/>
<ClInclude Include="leveldb-1.17.0\include\leveldb\slice.h"/>
<ClInclude Include="leveldb-1.17.0\include\leveldb\status.h"/>
<ClInclude Include="leveldb-1.17.0\include\leveldb\table.h"/>
<ClInclude Include="leveldb-1.17.0\include\leveldb\table_builder.h"/>
<ClInclude Include="leveldb-1.17.0\include\leveldb\write_batch.h"/>
<ClInclude Include="leveldb-1.17.0\port\port.h"/>
<ClInclude Include="leveldb-1.17.0\table\block.h"/>
<ClInclude Include="leveldb-1.17.0\table\block_builder.h"/>
<ClInclude Include="leveldb-1.17.0\table\filter_block.h"/>
<ClInclude Include="leveldb-1.17.0\table\format.h"/>
<ClInclude Include="leveldb-1.17.0\table\iterator_wrapper.h"/>
<ClInclude Include="leveldb-1.17.0\table\merger.h"/>
<ClInclude Include="leveldb-1.17.0\table\two_level_iterator.h"/>
<ClInclude Include="leveldb-1.17.0\util\arena.h"/>
<ClInclude Include="leveldb-1.17.0\util\coding.h"/>
<ClInclude Include="leveldb-1.17.0\util\crc32c.h"/>
<ClInclude Include="leveldb-1.17.0\util\hash.h"/>
<ClInclude Include="leveldb-1.17.0\util\logging.h"/>
<ClInclude Include="leveldb-1.17.0\util\mutexlock.h"/>
<ClInclude Include="leveldb-1.17.0\util\random.h"/>
</ItemGroup>
<ItemGroup>
<ClCompile Include="leveldb-1.17.0\db\builder.cc"/>
<ClCompile Include="leveldb-1.17.0\db\db_impl.cc"/>
<ClCompile Include="leveldb-1.17.0\db\db_iter.cc"/>
<ClCompile Include="leveldb-1.17.0\db\filename.cc"/>
<ClCompile Include="leveldb-1.17.0\db\dbformat.cc"/>
<ClCompile Include="leveldb-1.17.0\db\log_reader.cc"/>
<ClCompile Include="leveldb-1.17.0\db\log_writer.cc"/>
<ClCompile Include="leveldb-1.17.0\db\memtable.cc"/>
<ClCompile Include="leveldb-1.17.0\db\repair.cc"/>
<ClCompile Include="leveldb-1.17.0\db\table_cache.cc"/>
<ClCompile Include="leveldb-1.17.0\db\version_edit.cc"/>
<ClCompile Include="leveldb-1.17.0\db\version_set.cc"/>
<ClCompile Include="leveldb-1.17.0\db\write_batch.cc"/>
<ClCompile Include="leveldb-1.17.0\helpers\memenv\memenv.cc"/>
<ClCompile Include="leveldb-1.17.0\table\block.cc"/>
<ClCompile Include="leveldb-1.17.0\table\block_builder.cc"/>
<ClCompile Include="leveldb-1.17.0\table\filter_block.cc"/>
<ClCompile Include="leveldb-1.17.0\table\format.cc"/>
<ClCompile Include="leveldb-1.17.0\table\iterator.cc"/>
<ClCompile Include="leveldb-1.17.0\table\merger.cc"/>
<ClCompile Include="leveldb-1.17.0\table\table.cc"/>
<ClCompile Include="leveldb-1.17.0\table\table_builder.cc"/>
<ClCompile Include="leveldb-1.17.0\table\two_level_iterator.cc"/>
<ClCompile Include="leveldb-1.17.0\util\arena.cc"/>
<ClCompile Include="leveldb-1.17.0\util\bloom.cc"/>
<ClCompile Include="leveldb-1.17.0\util\cache.cc"/>
<ClCompile Include="leveldb-1.17.0\util\coding.cc"/>
<ClCompile Include="leveldb-1.17.0\util\comparator.cc"/>
<ClCompile Include="leveldb-1.17.0\util\crc32c.cc"/>
<ClCompile Include="leveldb-1.17.0\util\env.cc"/>
<ClCompile Include="leveldb-1.17.0\util\filter_policy.cc"/>
<ClCompile Include="leveldb-1.17.0\util\hash.cc"/>
<ClCompile Include="leveldb-1.17.0\util\logging.cc"/>
<ClCompile Include="leveldb-1.17.0\util\options.cc"/>
<ClCompile Include="leveldb-1.17.0\util\status.cc"/>
<ClCompile Include="port-libuv\port_uv.cc"/>
<ClCompile Include="port-libuv\env_win.cc"/>
<ClCompile Include="port-libuv\win_logger.cc"/>
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets"/>
<Import Project="$(VCTargetsPath)\BuildCustomizations\masm.targets"/>
<ImportGroup Label="ExtensionTargets"/>
</Project>
The article says include paths should not specify the Visual C++ and Windows SDK include paths directly As that can cause the issue displayed.
I can't see any references in the project file above so can we see if MSBUILD is pulling them in at execution time
npm i [email protected] --verbose
Specifically looking for the CL line which should appear after ClCompile: and just before the following is outputted
builder.cc
db_impl.cc
db_iter.cc
filename.cc
It will look something like
ClCompile:
C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\bin\amd64\CL.exe /c /I"C:\Users\whalleya\.node-gyp\0.12.7\src" /I"C:\Users\whalleya\.node-gyp\0.12.7\d
eps\uv\include" /I"C:\Users\whalleya\.node-gyp\0.12.7\deps\v8\include" /I"leveldb-1.18.0" /I"leveldb-1.18.0\include" /I"leveldb-1.18.0\port\win" /I"port-libu
v" /I"..\snappy\snappy-1.1.1" /Zi /nologo /W3 /WX- /Ox /Ob2 /Oi /Ot /Oy /GL /D NODE_GYP_MODULE_NAME=leveldb /D WIN32 /D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONS
TDC_NO_DEPRECATE /D BUILDING_V8_SHARED=1 /D BUILDING_UV_SHARED=1 /D SNAPPY=1 /D LEVELDB_PLATFORM_UV=1 /D NOMINMAX=1 /D _HAS_EXCEPTIONS=0 /GF /Gm- /MT /GS /Gy
/fp:precise /Zc:wchar_t /Zc:forScope /GR- /Fo"Release\obj\leveldb\\" /Fd"Release\obj\leveldb\vc120.pdb" /Gd /TP /wd4355 /wd4530 /wd4267 /wd4244 /wd4351 /wd4
355 /wd4800 /wd4251 /errorReport:queue /MP "leveldb-1.18.0\db\builder.cc" "leveldb-1.18.0\db\db_impl.cc" "leveldb-1.18.0\db\db_iter.cc" "leveldb-1.18.0\db\fi
lename.cc" "leveldb-1.18.0\db\dbformat.cc" "leveldb-1.18.0\db\leveldb_main.cc" "leveldb-1.18.0\db\log_reader.cc" "leveldb-1.18.0\db\log_writer.cc" "leveldb-1
.18.0\db\memtable.cc" "leveldb-1.18.0\db\repair.cc" "leveldb-1.18.0\db\table_cache.cc" "leveldb-1.18.0\db\version_edit.cc" "leveldb-1.18.0\db\version_set.cc"
"leveldb-1.18.0\db\write_batch.cc" "leveldb-1.18.0\helpers\memenv\memenv.cc" "leveldb-1.18.0\table\block.cc" "leveldb-1.18.0\table\block_builder.cc" "leveld
b-1.18.0\table\filter_block.cc" "leveldb-1.18.0\table\format.cc" "leveldb-1.18.0\table\iterator.cc" "leveldb-1.18.0\table\merger.cc" "leveldb-1.18.0\table\ta
ble.cc" "leveldb-1.18.0\table\table_builder.cc" "leveldb-1.18.0\table\two_level_iterator.cc" "leveldb-1.18.0\util\arena.cc" "leveldb-1.18.0\util\bloom.cc" "l
eveldb-1.18.0\util\cache.cc" "leveldb-1.18.0\util\coding.cc" "leveldb-1.18.0\util\comparator.cc" "leveldb-1.18.0\util\crc32c.cc" "leveldb-1.18.0\util\env.cc"
"leveldb-1.18.0\util\filter_policy.cc" "leveldb-1.18.0\util\hash.cc" "leveldb-1.18.0\util\hash_test.cc" "leveldb-1.18.0\util\logging.cc" "leveldb-1.18.0\uti
l\options.cc" "leveldb-1.18.0\util\status.cc" "port-libuv\port_uv.cc" "port-libuv\env_win.cc" "port-libuv\win_logger.cc"
ClCompile:
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\amd64_x86\CL.exe /c /I"C:\Users\Michael\.node-gyp\0.12.5\src" /I"C:\Users\Michael\.node-gyp\0.12.5\deps\uv\include" /I"C:\Users\Michael\.node-gyp\0.12.5\deps\v8\include" /I"leveldb-1.18.0" /I"leveldb-1.18.0\include" /I"leveldb-1.18.0\port\win" /I"port-libuv" /I"..\snappy\snappy-1.1.1" /Zi /nologo /W3 /WX- /Ox /Ob2 /Oi /Ot /Oy /GL /D NODE_GYP_MODULE_NAME=leveldb /D WIN32 /D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE /D BUILDING_V8_SHARED=1 /D BUILDING_UV_SHARED=1 /D SNAPPY=1 /D LEVELDB_PLATFORM_UV=1 /D NOMINMAX=1 /D _HAS_EXCEPTIONS=0 /GF /Gm- /MT /GS /Gy /fp:precise /Zc:wchar_t /Zc:forScope /Zc:inline /GR- /Fo"Release\obj\leveldb\\" /Fd"Release\obj\leveldb\leveldb.pdb" /Gd /TP /wd4355 /wd4530 /wd4267 /wd4244 /wd4351 /wd4355 /wd4800 /wd4251 /analyze- /errorReport:queue /MP "leveldb-1.18.0\db\builder.cc" "leveldb-1.18.0\db\db_impl.cc" "leveldb-1.18.0\db\db_iter.cc" "leveldb-1.18.0\db\filename.cc" "leveldb-1.18.0\db\dbformat.cc" "leveldb-1.18.0\db\leveldb_main.cc" "leveldb-1.18.0\db\log_reader.cc" "leveldb-1.18.0\db\log_writer.cc" "leveldb-1.18.0\db\memtable.cc" "leveldb-1.18.0\db\repair.cc" "leveldb-1.18.0\db\table_cache.cc" "leveldb-1.18.0\db\version_edit.cc" "leveldb-1.18.0\db\version_set.cc" "leveldb-1.18.0\db\write_batch.cc" "leveldb-1.18.0\helpers\memenv\memenv.cc" "leveldb-1.18.0\table\block.cc" "leveldb-1.18.0\table\block_builder.cc" "leveldb-1.18.0\table\filter_block.cc" "leveldb-1.18.0\table\format.cc" "leveldb-1.18.0\table\iterator.cc" "leveldb-1.18.0\table\merger.cc" "leveldb-1.18.0\table\table.cc" "leveldb-1.18.0\table\table_builder.cc" "leveldb-1.18.0\table\two_level_iterator.cc" "leveldb-1.18.0\util\arena.cc" "leveldb-1.18.0\util\bloom.cc" "leveldb-1.18.0\util\cache.cc" "leveldb-1.18.0\util\coding.cc" "leveldb-1.18.0\util\comparator.cc" "leveldb-1.18.0\util\crc32c.cc" "leveldb-1.18.0\util\env.cc" "leveldb-1.18.0\util\filter_policy.cc" "leveldb-1.18.0\util\hash.cc" "leveldb-1.18.0\util\hash_test.cc" "leveldb-1.18.0\util\logging.cc" "leveldb-1.18.0\util\options.cc" "leveldb-1.18.0\util\status.cc" "port-libuv\port_uv.cc" "port-libuv\env_win.cc" "port-libuv\win_logger.cc"
Added newlines:
ClCompile:
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\amd64_x86\CL.exe /c
/I"C:\Users\Michael\.node-gyp\0.12.5\src"
/I"C:\Users\Michael\.node-gyp\0.12.5\deps\uv\include"
/I"C:\Users\Michael\.node-gyp\0.12.5\deps\v8\include"
/I"leveldb-1.18.0"
/I"leveldb-1.18.0\include"
/I"leveldb-1.18.0\port\win"
/I"port-libuv"
/I"..\snappy\snappy-1.1.1"
/Zi /nologo /W3 /WX- /Ox /Ob2 /Oi /Ot /Oy /GL
/D NODE_GYP_MODULE_NAME=leveldb
/D WIN32
/D _CRT_SECURE_NO_DEPRECATE
/D _CRT_NONSTDC_NO_DEPRECATE
/D BUILDING_V8_SHARED=1
/D BUILDING_UV_SHARED=1
/D SNAPPY=1
/D LEVELDB_PLATFORM_UV=1
/D NOMINMAX=1
/D _HAS_EXCEPTIONS=0
/GF /Gm- /MT /GS /Gy /fp:precise
/Zc:wchar_t /Zc:forScope /Zc:inline
/GR-
/Fo"Release\obj\leveldb\\"
/Fd"Release\obj\leveldb\leveldb.pdb"
/Gd /TP /wd4355 /wd4530 /wd4267 /wd4244 /wd4351 /wd4355 /wd4800 /wd4251 /analyze- /errorReport:queue /MP
"leveldb-1.18.0\db\builder.cc"
"leveldb-1.18.0\db\db_impl.cc"
"leveldb-1.18.0\db\db_iter.cc"
"leveldb-1.18.0\db\filename.cc"
"leveldb-1.18.0\db\dbformat.cc"
"leveldb-1.18.0\db\leveldb_main.cc"
"leveldb-1.18.0\db\log_reader.cc"
"leveldb-1.18.0\db\log_writer.cc"
"leveldb-1.18.0\db\memtable.cc"
"leveldb-1.18.0\db\repair.cc"
"leveldb-1.18.0\db\table_cache.cc"
"leveldb-1.18.0\db\version_edit.cc"
"leveldb-1.18.0\db\version_set.cc"
"leveldb-1.18.0\db\write_batch.cc"
"leveldb-1.18.0\helpers\memenv\memenv.cc"
"leveldb-1.18.0\table\block.cc"
"leveldb-1.18.0\table\block_builder.cc"
"leveldb-1.18.0\table\filter_block.cc"
"leveldb-1.18.0\table\format.cc"
"leveldb-1.18.0\table\iterator.cc"
"leveldb-1.18.0\table\merger.cc"
"leveldb-1.18.0\table\table.cc"
"leveldb-1.18.0\table\table_builder.cc"
"leveldb-1.18.0\table\two_level_iterator.cc"
"leveldb-1.18.0\util\arena.cc"
"leveldb-1.18.0\util\bloom.cc"
"leveldb-1.18.0\util\cache.cc"
"leveldb-1.18.0\util\coding.cc"
"leveldb-1.18.0\util\comparator.cc"
"leveldb-1.18.0\util\crc32c.cc"
"leveldb-1.18.0\util\env.cc"
"leveldb-1.18.0\util\filter_policy.cc"
"leveldb-1.18.0\util\hash.cc"
"leveldb-1.18.0\util\hash_test.cc"
"leveldb-1.18.0\util\logging.cc"
"leveldb-1.18.0\util\options.cc"
"leveldb-1.18.0\util\status.cc"
"port-libuv\port_uv.cc"
"port-libuv\env_win.cc"
"port-libuv\win_logger.cc"
Thanks @ArtskydJ The only difference I can see between the to is the /Zc:inline option This is defaulted to off in VS 2013 https://msdn.microsoft.com/en-us/library/dn449508.aspx
Could you run that command you gave with /Zc:inline- instead of /Zc:inline Or take it off completely
Also can you tell me if C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\stdint.h exists please
The file you mentioned does exist.
I tried running the command straight from the command line but I got this popup error:
Right ok that's probably because you need a VS comandprompt.
So here is the build anyway. `npm i [email protected]`` It was built with node v0.12 https://drive.google.com/file/d/0B1Sqmq8yhAUVTlpyUXlXUFI1NnM/view?usp=sharing You can unzip that into your node_modules folder and that will at least unblock you.
Ok, thanks.
I have multiple versions of MSVS installed; I don't know if they overwrite each other, so I don't know if I am able to use an old version.
Do you know if it's possible to force node-gyp to use a different version of MSVS?
Well you could try running "Developer Command Prompt for VS2013" Usually in C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\Tools\Shortcuts
Then
npm i [email protected] --msvs_version=2013
I am experiencing the VS2015 issue as well ... Have been trying a number of things to try and resolve, Python, VC++, etc.
I receive this error a number of times in the log
..\src\odbc_connection.cpp(436): error C2668: 'NanThrowError': ambiguous call t o overloaded function [C:\Users\dhook\AppData\Roaming\npm\node_modules\odbc\bui ld\odbc_bindings.vcxproj]
Here is a larger portion of the log
ode_gyp (node "H:\nodejs\node_modules\npm\bin\node-gyp-bin....\node_modules\n ode-gyp\bin\node-gyp.js" configure build ) else (node configure build ) Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch. odbc.cpp odbc_connection.cpp odbc_statement.cpp odbc_result.cpp dynodbc.cpp ..\src\odbc_connection.cpp(436): error C2668: 'NanThrowError': ambiguous call t o overloaded function [C:\Users\dhook\AppData\Roaming\npm\node_modules\odbc\bui ld\odbc_bindings.vcxproj] C:\Users\dhook\AppData\Roaming\npm\node_modules\odbc\node_modules\nan\nan.h(7 19): note: could be 'void NanThrowError(v8::Handlev8::Value)' (compiling so urce file ..\src\odbc_connection.cpp) C:\Users\dhook\AppData\Roaming\npm\node_modules\odbc\node_modules\nan\nan.h(7 11): note: or 'void NanThrowError(v8::Handlev8::String)' (compiling s ource file ..\src\odbc_connection.cpp) C:\Users\dhook\AppData\Roaming\npm\node_modules\odbc\node_modules\nan\nan.h(7 11): note: or 'void NanThrowError(const char *)' (compiling source file ..\src\odbc_connection.cpp) ..\src\odbc_connection.cpp(436): note: while trying to match the argument lis t '(v8::Localv8::Object)' ..\src\odbc.cpp(143): error C2668: 'NanThrowError': ambiguous call to overloade d function [C:\Users\dhook\AppData\Roaming\npm\node_modules\odbc\build\odbc_bin dings.vcxproj]
Hi @donaldhook If looks like you are trying to compile odbc and not leveldown
..\src\odbc_connection.cpp(436): error C2668: 'NanThrowError': ambiguous call t o overloaded function [C:\Users\dhook\AppData\Roaming\npm\node_modules\odbc\bui ld\odbc_bindings.vcxproj]
Can I suggest you raise the issue there https://github.com/wankdanker/node-odbc Thanks
I was trying to port leveldown-mobile to Windows UWP and saw this issue showing up. The problem is stdint.h under the port/win folder of leveldb. That shouldn't be included by MSVS 2013+ (don't yet tested 2012 though)
What I'm planning to add is something like below; (into leveldb.gyp)
['OS == "win"', {
'conditions': [
['MSVS_VERSION != "2015" and MSVS_VERSION != "2013"', {
'include_dirs': [
'leveldb-<(ldbversion)/port/win'
]
}]
],
This solves the problem given by @ArtskydJ yet lots of others to go for UWP.. (fingers crossed)