添加链接
link管理
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接

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 Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting label May 28, 2019

The same. Debug x64 build passed but Release x64 failed with same issue.

1>------ Build started: Project: TerminalConnection, Configuration: Release x64 ------
1>LINK : fatal error C1007: unrecognized flag '-Yu' in 'p2'
1>LINK : fatal error LNK1257: code generation failed
1>Done building project "TerminalConnection.vcxproj" -- FAILED.
2>------ Build started: Project: TerminalControl, Configuration: Release x64 ------
2>LINK : fatal error C1007: unrecognized flag '-Yu' in 'p2'
2>LINK : fatal error LNK1257: code generation failed
2>Done building project "TerminalControl.vcxproj" -- FAILED.

Could you give some more context on that error text? I've never seen it before.

I also saw this.

  • Clone the repro,
  • Update the submodules
  • Opened with VS2019
  • upgrade the solution
  • build the solution.
  • This is the Error that I get

    27>------ Build started: Project: Host.unittest, Configuration: Release x64 ------
    25>readData.cpp
    27>precomp.cpp
    25>readDataDirect.cpp
    25>readDataRaw.cpp
    25>registry.cpp
    15>Nihilist.vcxproj -> D:\MyProjects\GitHub\terminal\\bin\x64\Release\Nihilist.exe
    24>LINK : fatal error C1007: unrecognized flag '-Yu' in 'p2'
    24>LINK : fatal error LNK1257: code generation failed
              

    I had the same error. VS2019/tools v142, and every build failed with at least two modules returning the "Unrecognized flag -Yu in p2" error. Re-targeted after clone, and individually re-targeted the UWP projects that didn't move from 141 to 142 during the initial re-target. Still got the errors during every build.

    Tried HimiSaber's solution -- after another failed build, right-clicked the OpenConsole.sln and clicked Re-target solution. That finished, so I built again. No errors! Launching the WindowsTerminal.exe still didn't work (would appear, then disappear after a few seconds), but I deployed anyway. Only took a few seconds, as the solution had been properly built. Checked Start Menu, and Windows Terminal (Dev Build) was there and working!

    Thank you HimiSaber! I almost didn't try it, as I'd already re-targeted several times.

    Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something labels Jun 7, 2019

    I had a similar issue in a completely unrelated project. Going into my project properties and setting Linker -> General -> Show Progress to /VERBOSE gave me a clue -- it showed a library of mine that it was searching for. A stack overflow comment suggested this was caused by this library being built with a different version of visual studio. I rebuilt both using the same version of visual studio (being mindful to build the appropriate architecture & release) and this error went away.