1

I wanted to install apiaryio/drafter on windows. I installed python 2.7 and visuall studio 12 "Full version". It needed to add some folders to system path because of not finding some files like "mspdb110.dll". But the latest problem related to "fatal error LNK1104: cannot open file 'kernel32.lib'" was not solved even by adding its address to system path.

How can I solve it?

View of the errors

C:\WINDOWS\system32>cd C:\Users\MJZ\Documents\GitHub\drafter

C:\Users\MJZ\Documents\GitHub\drafter>vcbuild.bat
creating config.gypi
creating config.mk
creating makefiles
Warning: Missing input files:
./build\ext\snowcrash\..\..\..\ext\snowcrash\src\Version.h
All OK.
Project files generated.
ERROR: Cannot determine the location of the VS Common Tools folder.
Building Snow Crash...
Build started 2015-05-02 9:27:50 AM.
     1>Project "C:\Users\MJZ\Documents\GitHub\drafter\build\drafter.sln" on nod
       e 1 (default targets).
     1>ValidateSolutionConfiguration:
         Building solution configuration "Release|Win32".
     1>Project "C:\Users\MJZ\Documents\GitHub\drafter\build\drafter.sln" (1) is
        building "C:\Users\MJZ\Documents\GitHub\drafter\build\test-libdrafter.v
       cxproj.metaproj" (3) on node 1 (default targets).
     3>Project "C:\Users\MJZ\Documents\GitHub\drafter\build\test-libdrafter.vcx
       proj.metaproj" (3) is building "C:\Users\MJZ\Documents\GitHub\drafter\bu
       ild\ext\snowcrash\libmarkdownparser.vcxproj" (4) on node 1 (default targ
       ets).
     4>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V110\Microsoft.CppBuil
       d.targets(344,5): warning MSB8003: Could not find WindowsSDKDir variable
        from the registry.  TargetFrameworkVersion or PlatformToolset may be se
       t to an invalid version number. [C:\Users\MJZ\Documents\GitHub\drafter\b
       uild\ext\snowcrash\libmarkdownparser.vcxproj]
     1>Project "C:\Users\MJZ\Documents\GitHub\drafter\build\drafter.sln" (1) is
        building "C:\Users\MJZ\Documents\GitHub\drafter\build\drafter.vcxproj.m
       etaproj" (2) on node 1 (default targets).
     2>Project "C:\Users\MJZ\Documents\GitHub\drafter\build\drafter.vcxproj.met
       aproj" (2) is building "C:\Users\MJZ\Documents\GitHub\drafter\build\ext\
       snowcrash\libsnowcrash.vcxproj" (5) on node 4 (default targets).
     5>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V110\Microsoft.CppBuil
       d.targets(344,5): warning MSB8003: Could not find WindowsSDKDir variable
        from the registry.  TargetFrameworkVersion or PlatformToolset may be se
       t to an invalid version number. [C:\Users\MJZ\Documents\GitHub\drafter\b
       uild\ext\snowcrash\libsnowcrash.vcxproj]
     2>Project "C:\Users\MJZ\Documents\GitHub\drafter\build\drafter.vcxproj.met
       aproj" (2) is building "C:\Users\MJZ\Documents\GitHub\drafter\build\libs
       os.vcxproj" (7) on node 3 (default targets).
     7>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V110\Microsoft.CppBuil
       d.targets(344,5): warning MSB8003: Could not find WindowsSDKDir variable
        from the registry.  TargetFrameworkVersion or PlatformToolset may be se
       t to an invalid version number. [C:\Users\MJZ\Documents\GitHub\drafter\b
       uild\libsos.vcxproj]
     2>Project "C:\Users\MJZ\Documents\GitHub\drafter\build\drafter.vcxproj.met
       aproj" (2) is building "C:\Users\MJZ\Documents\GitHub\drafter\build\libd
       rafter.vcxproj" (6) on node 2 (default targets).
     6>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V110\Microsoft.CppBuil
       d.targets(344,5): warning MSB8003: Could not find WindowsSDKDir variable
        from the registry.  TargetFrameworkVersion or PlatformToolset may be se
       t to an invalid version number. [C:\Users\MJZ\Documents\GitHub\drafter\b
       uild\libdrafter.vcxproj]
     4>InitializeBuildStatus:
         Creating "Release\obj\libmarkdownparser\libmarkdownparser.unsuccessful
         build" because "AlwaysCreate" was specified.
     7>InitializeBuildStatus:
         Creating "Release\obj\libsos\libsos.unsuccessfulbuild" because "Always
         Create" was specified.
     5>InitializeBuildStatus:
         Creating "Release\obj\libsnowcrash\libsnowcrash.unsuccessfulbuild" bec
         ause "AlwaysCreate" was specified.
     6>InitializeBuildStatus:
         Creating "Release\obj\libdrafter\libdrafter.unsuccessfulbuild" because
          "AlwaysCreate" was specified.
     4>ClCompile:
         All outputs are up-to-date.
       Lib:
         All outputs are up-to-date.
         libmarkdownparser.vcxproj -> C:\Users\MJZ\Documents\GitHub\drafter\bui
         ld\Release\lib\libmarkdownparser.lib
       FinalizeBuildStatus:
         Deleting file "Release\obj\libmarkdownparser\libmarkdownparser.unsucce
         ssfulbuild".
         Touching "Release\obj\libmarkdownparser\libmarkdownparser.lastbuildsta
         te".
     4>Done Building Project "C:\Users\MJZ\Documents\GitHub\drafter\build\ext\s
       nowcrash\libmarkdownparser.vcxproj" (default targets).
     3>Project "C:\Users\MJZ\Documents\GitHub\drafter\build\test-libdrafter.vcx
       proj.metaproj" (3) is building "C:\Users\MJZ\Documents\GitHub\drafter\bu
       ild\ext\snowcrash\libsundown.vcxproj" (8) on node 1 (default targets).
     8>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V110\Microsoft.CppBuil
       d.targets(344,5): warning MSB8003: Could not find WindowsSDKDir variable
        from the registry.  TargetFrameworkVersion or PlatformToolset may be se
       t to an invalid version number. [C:\Users\MJZ\Documents\GitHub\drafter\b
       uild\ext\snowcrash\libsundown.vcxproj]
     8>InitializeBuildStatus:
         Creating "Release\obj\libsundown\libsundown.unsuccessfulbuild" because
          "AlwaysCreate" was specified.
     7>ClCompile:
         All outputs are up-to-date.
     6>ClCompile:
         All outputs are up-to-date.
     5>ClCompile:
         All outputs are up-to-date.
     7>Lib:
         All outputs are up-to-date.
         libsos.vcxproj -> C:\Users\MJZ\Documents\GitHub\drafter\build\Release\
         lib\libsos.lib
     6>Lib:
         All outputs are up-to-date.
         libdrafter.vcxproj -> C:\Users\MJZ\Documents\GitHub\drafter\build\Rele
         ase\lib\libdrafter.lib
     8>ClCompile:
         All outputs are up-to-date.
     5>Lib:
         All outputs are up-to-date.
     7>FinalizeBuildStatus:
         Deleting file "Release\obj\libsos\libsos.unsuccessfulbuild".
         Touching "Release\obj\libsos\libsos.lastbuildstate".
     6>FinalizeBuildStatus:
         Deleting file "Release\obj\libdrafter\libdrafter.unsuccessfulbuild".
     7>Done Building Project "C:\Users\MJZ\Documents\GitHub\drafter\build\libso
       s.vcxproj" (default targets).
     6>FinalizeBuildStatus:
         Touching "Release\obj\libdrafter\libdrafter.lastbuildstate".
     5>Lib:
         libsnowcrash.vcxproj -> C:\Users\MJZ\Documents\GitHub\drafter\build\Re
         lease\lib\libsnowcrash.lib
       FinalizeBuildStatus:
         Deleting file "Release\obj\libsnowcrash\libsnowcrash.unsuccessfulbuild
         ".
         Touching "Release\obj\libsnowcrash\libsnowcrash.lastbuildstate".
     6>Done Building Project "C:\Users\MJZ\Documents\GitHub\drafter\build\libdr
       after.vcxproj" (default targets).
     5>Done Building Project "C:\Users\MJZ\Documents\GitHub\drafter\build\ext\s
       nowcrash\libsnowcrash.vcxproj" (default targets).
     8>Lib:
         All outputs are up-to-date.
         libsundown.vcxproj -> C:\Users\MJZ\Documents\GitHub\drafter\build\Rele
         ase\lib\libsundown.lib
       FinalizeBuildStatus:
         Deleting file "Release\obj\libsundown\libsundown.unsuccessfulbuild".
         Touching "Release\obj\libsundown\libsundown.lastbuildstate".
     8>Done Building Project "C:\Users\MJZ\Documents\GitHub\drafter\build\ext\s
       nowcrash\libsundown.vcxproj" (default targets).
     2>Project "C:\Users\MJZ\Documents\GitHub\drafter\build\drafter.vcxproj.met
       aproj" (2) is building "C:\Users\MJZ\Documents\GitHub\drafter\build\draf
       ter.vcxproj" (9) on node 3 (default targets).
     9>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V110\Microsoft.CppBuil
       d.targets(344,5): warning MSB8003: Could not find WindowsSDKDir variable
        from the registry.  TargetFrameworkVersion or PlatformToolset may be se
       t to an invalid version number. [C:\Users\MJZ\Documents\GitHub\drafter\b
       uild\drafter.vcxproj]
     3>Project "C:\Users\MJZ\Documents\GitHub\drafter\build\test-libdrafter.vcx
       proj.metaproj" (3) is building "C:\Users\MJZ\Documents\GitHub\drafter\bu
       ild\test-libdrafter.vcxproj" (10) on node 2 (default targets).
    10>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V110\Microsoft.CppBuil
       d.targets(344,5): warning MSB8003: Could not find WindowsSDKDir variable
        from the registry.  TargetFrameworkVersion or PlatformToolset may be se
       t to an invalid version number. [C:\Users\MJZ\Documents\GitHub\drafter\b
       uild\test-libdrafter.vcxproj]
     9>InitializeBuildStatus:
         Touching "Release\obj\drafter\drafter.unsuccessfulbuild".
    10>InitializeBuildStatus:
         Touching "Release\obj\test-libdrafter\test-libdrafter.unsuccessfulbuil
         d".
     9>ClCompile:
         All outputs are up-to-date.
    10>ClCompile:
         C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\bin\CL.exe /c /
         I..\src /I..\test /I..\test\vendor\Catch\include /I..\ext\snowcrash\sr
         c /I"..\ext\snowcrash\ext\markdown-parser\src" /I"..\ext\snowcrash\ext
         \markdown-parser\ext\sundown\src" /I..\ext\sos\src /Zi /nologo /W1 /WX
         - /Od /Ob2 /Oi /Ot /Oy /GL /D BUILDING_SNOWCRASH=1 /D WIN32 /D _CRT_SE
         CURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE /D WIN /Gm- /EHsc /MD /
         GS /Gy /fp:precise /Zc:wchar_t /Zc:forScope /GR /Fo"Release\obj\test-l
         ibdrafter\\" /Fd"Release\obj\test-libdrafter\vc110.pdb" /Gd /TP /analy
         ze- /errorReport:queue /MP "..\test\test-main.cc"
     9>Link:
         C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\bin\link.exe /E
         RRORREPORT:QUEUE /OUT:"C:\Users\MJZ\Documents\GitHub\drafter\build\Rel
         ease\drafter.exe" /INCREMENTAL:NO /NOLOGO /MANIFEST /MANIFESTUAC:"leve
         l='asInvoker' uiAccess='false'" /manifest:embed /PDB:"C:\Users\MJZ\Doc
         uments\GitHub\drafter\build\Release\drafter.pdb" /SUBSYSTEM:CONSOLE /O
         PT:REF /OPT:ICF /LTCG /TLBID:1 /DYNAMICBASE /NXCOMPAT /IMPLIB:"C:\User
         s\MJZ\Documents\GitHub\drafter\build\Release\drafter.lib" /MACHINE:X86
          /SAFESEH Release\obj\drafter\main.obj
         Release\obj\drafter\config.obj
         Release\obj\drafter\reporting.obj
         C:\Users\MJZ\Documents\GitHub\drafter\build\Release\lib\libdrafter.lib
         C:\Users\MJZ\Documents\GitHub\drafter\build\Release\lib\libsos.lib
         C:\Users\MJZ\Documents\GitHub\drafter\build\Release\lib\libsnowcrash.l
         ib
         C:\Users\MJZ\Documents\GitHub\drafter\build\Release\lib\libmarkdownpar
         ser.lib
         C:\Users\MJZ\Documents\GitHub\drafter\build\Release\lib\libsundown.lib
    10>ClCompile:
         test-main.cc
     9>LINK : fatal error LNK1104: cannot open file 'kernel32.lib' [C:\Users\MJ
       Z\Documents\GitHub\drafter\build\drafter.vcxproj]
     9>Done Building Project "C:\Users\MJZ\Documents\GitHub\drafter\build\draft
       er.vcxproj" (default targets) -- FAILED.
     2>Done Building Project "C:\Users\MJZ\Documents\GitHub\drafter\build\draft
       er.vcxproj.metaproj" (default targets) -- FAILED.
    10>c:\users\mjz\documents\github\drafter\test\vendor\catch\include\internal
       \catch_console_colour_impl.hpp(29): fatal error C1083: Cannot open inclu
       de file: 'windows.h': No such file or directory [C:\Users\MJZ\Documents\
       GitHub\drafter\build\test-libdrafter.vcxproj]
    10>Done Building Project "C:\Users\MJZ\Documents\GitHub\drafter\build\test-
       libdrafter.vcxproj" (default targets) -- FAILED.
     3>Done Building Project "C:\Users\MJZ\Documents\GitHub\drafter\build\test-
       libdrafter.vcxproj.metaproj" (default targets) -- FAILED.
     1>Done Building Project "C:\Users\MJZ\Documents\GitHub\drafter\build\draft
       er.sln" (default targets) -- FAILED.
Build FAILED.

Time Elapsed 00:00:10.03
MJBZA
  • 4,796
  • 8
  • 48
  • 97

2 Answers2

1

Since version 1.4.0 Dredd doesn't need C++ compiler or anything like that during installation. I hope you can now install it on Windows without any problems!


At the same time, I need to warn you that Dredd's support for Windows is flaky. It's not officially supported platform yet, we don't run any tests on AppVeyor yet. It's planned, but we're not there yet. Some users reportedly use Dredd on Windows without any problems, some have issues. If you bump into any, please go to Dredd's GitHub repo and help us to at least track them, if not try to contribute a fix.

Honza Javorek
  • 8,566
  • 8
  • 47
  • 66
0

tl;dr: Install Visual Studio Express.

Long version:

Dredd relies on drafter.js and according to this issue, it looks that now relies on C++ drafter that needs to be compiled at installation time.

The main developer points here to the drafter Windows installation notes.

Almad
  • 5,753
  • 7
  • 35
  • 53
  • At first I installed the VS Express, but it asked me for VC command prompt for builing the vcbuild.bat file. After lots of researches I found out the VC command prompt is just installed with full version. But I am going to test your idea once again. – MJBZA Apr 26 '15 at 15:41
  • I have installed VS Express, but nothing happened. Same errors same problems exists. – MJBZA Apr 26 '15 at 16:27
  • @MJZ I think it's worth [filing a bugreport](https://github.com/apiaryio/dredd/issues) then :( – Almad Apr 27 '15 at 08:40
  • @MJZ A full MSVC version isn't needed, it works just fine for me with Express 2012 for Desktop. Judging by the message you have some weird settings of paths on your system. Can you please try to run vsbuild.bat from the "Developer Command Prompt" instead of GitHub shell or regular command prompt? – Zdenek Apr 30 '15 at 22:02
  • Dear @Zdenek you wrote vsbuild.bat but there is vcbuild.bat inside of the drafter folder. Where is it? Also I did all the steps that I wrote in the top with Developer Command Prompt of the MSVC. Not from GitHub or Regular cmd. – MJBZA May 01 '15 at 08:14
  • @MJZ that was a typo – I have meant vcbuild.bat indeed – Zdenek May 01 '15 at 15:46
  • @MJZ can you please link full build output from running vcbuild.bat in Dev command prompt? Note this really seems like mismatched settings on the Windows box you are trying to build it. Are you able to build other MSVC projects from command line? – Zdenek May 01 '15 at 15:51
  • @Zdenek Please check the question again I have added all the output of the Dev Command Prompt. I have run it even by administrator right! And Also I can compile other projects. I think it is better you try to do all the steps on machine with a new windows, without any compiler or other software! – MJBZA May 02 '15 at 07:37
  • @MJZ every time a CI is run it happens on a clear machine check https://github.com/apiaryio/drafter/blob/master/appveyor.yml – Zdenek May 04 '15 at 16:14
  • For the record this is the full log from my computer https://gist.github.com/zdne/028a70e989dbc8cbdbf4 – Zdenek May 04 '15 at 17:11