FuzzWrapper project is failing to build #11037

Closed
opened 2026-01-31 02:36:56 +00:00 by claunia · 5 comments
Owner

Originally created by @j4james on GitHub (Oct 15, 2020).

Environment

Windows build number: Version 10.0.18362.1082
Windows Terminal version (if applicable): commit f78687453c
Visual Studio version: 16.7.1 (community 2019)

Steps to reproduce

  1. Checkout latest code (commit f78687453c)
  2. Open the OpenConsole solution in Visual Studio.
  3. Build the solution.

Expected behavior

The entire solution should build successfully.

Actual behavior

The FuzzWrapper project is failing with multiple link errors.

3>ConTermParser.lib(OutputStateMachineEngine.obj) : error LNK2001: unresolved external symbol "class std::vector<class std::basic_string_view<wchar_t,struct std::char_traits<wchar_t> >,class std::allocator<class std::basic_string_view<wchar_t,struct std::char_traits<wchar_t> > > > __cdecl Microsoft::Console::Utils::SplitString(class std::basic_string_view<wchar_t,struct std::char_traits<wchar_t> >,wchar_t)" (?SplitString@Utils@Console@Microsoft@@YA?AV?$vector@V?$basic_string_view@_WU?$char_traits@_W@std@@@std@@V?$allocator@V?$basic_string_view@_WU?$char_traits@_W@std@@@std@@@2@@std@@V?$basic_string_view@_WU?$char_traits@_W@std@@@5@_W@Z)
3>ConTermParser.lib(OutputStateMachineEngine.obj) : error LNK2001: unresolved external symbol "bool __cdecl Microsoft::Console::Utils::StringToUint(class std::basic_string_view<wchar_t,struct std::char_traits<wchar_t> >,unsigned int &)" (?StringToUint@Utils@Console@Microsoft@@YA_NV?$basic_string_view@_WU?$char_traits@_W@std@@@std@@AEAI@Z)
3>ConTermParser.lib(OutputStateMachineEngine.obj) : error LNK2001: unresolved external symbol "class std::optional<struct til::color> __cdecl Microsoft::Console::Utils::ColorFromXTermColor(class std::basic_string_view<wchar_t,struct std::char_traits<wchar_t> >)" (?ColorFromXTermColor@Utils@Console@Microsoft@@YA?AV?$optional@Ucolor@til@@@std@@V?$basic_string_view@_WU?$char_traits@_W@std@@@5@@Z)
3>C:\...\terminal\bin\x64\Release\ConTerm.Parser.FuzzWrapper.exe : fatal error LNK1120: 3 unresolved externals
3>Done building project "FuzzWrapper.vcxproj" -- FAILED.

I think those functions were only recently added in PR #7578, and maybe it's just a lib reference that now needs to be added to the FuzzWrapper project.

That said, I'm not sure if this is just my problem, because it doesn't seem to be failing in the CI builds.

Originally created by @j4james on GitHub (Oct 15, 2020). # Environment Windows build number: Version 10.0.18362.1082 Windows Terminal version (if applicable): commit f78687453cd63a2e92a146441fc482f1ec5ad598 Visual Studio version: 16.7.1 (community 2019) # Steps to reproduce 1. Checkout latest code (commit f78687453cd63a2e92a146441fc482f1ec5ad598) 2. Open the _OpenConsole_ solution in Visual Studio. 3. Build the solution. # Expected behavior The entire solution should build successfully. # Actual behavior The _FuzzWrapper_ project is failing with multiple link errors. ``` 3>ConTermParser.lib(OutputStateMachineEngine.obj) : error LNK2001: unresolved external symbol "class std::vector<class std::basic_string_view<wchar_t,struct std::char_traits<wchar_t> >,class std::allocator<class std::basic_string_view<wchar_t,struct std::char_traits<wchar_t> > > > __cdecl Microsoft::Console::Utils::SplitString(class std::basic_string_view<wchar_t,struct std::char_traits<wchar_t> >,wchar_t)" (?SplitString@Utils@Console@Microsoft@@YA?AV?$vector@V?$basic_string_view@_WU?$char_traits@_W@std@@@std@@V?$allocator@V?$basic_string_view@_WU?$char_traits@_W@std@@@std@@@2@@std@@V?$basic_string_view@_WU?$char_traits@_W@std@@@5@_W@Z) 3>ConTermParser.lib(OutputStateMachineEngine.obj) : error LNK2001: unresolved external symbol "bool __cdecl Microsoft::Console::Utils::StringToUint(class std::basic_string_view<wchar_t,struct std::char_traits<wchar_t> >,unsigned int &)" (?StringToUint@Utils@Console@Microsoft@@YA_NV?$basic_string_view@_WU?$char_traits@_W@std@@@std@@AEAI@Z) 3>ConTermParser.lib(OutputStateMachineEngine.obj) : error LNK2001: unresolved external symbol "class std::optional<struct til::color> __cdecl Microsoft::Console::Utils::ColorFromXTermColor(class std::basic_string_view<wchar_t,struct std::char_traits<wchar_t> >)" (?ColorFromXTermColor@Utils@Console@Microsoft@@YA?AV?$optional@Ucolor@til@@@std@@V?$basic_string_view@_WU?$char_traits@_W@std@@@5@@Z) 3>C:\...\terminal\bin\x64\Release\ConTerm.Parser.FuzzWrapper.exe : fatal error LNK1120: 3 unresolved externals 3>Done building project "FuzzWrapper.vcxproj" -- FAILED. ``` I think those functions were only recently added in PR #7578, and maybe it's just a lib reference that now needs to be added to the _FuzzWrapper_ project. That said, I'm not sure if this is just my problem, because it doesn't seem to be failing in the CI builds.
Author
Owner

@PankajBhojwani commented on GitHub (Oct 15, 2020):

It repros for me as well! Thanks for the catch

@PankajBhojwani commented on GitHub (Oct 15, 2020): It repros for me as well! Thanks for the catch
Author
Owner

@skyline75489 commented on GitHub (Oct 16, 2020):

I've seen this when I was working on #7578 but it's not consistent. I thought it's just some random & transient compiler glitches.

@skyline75489 commented on GitHub (Oct 16, 2020): I've seen this when I was working on #7578 but it's not consistent. I thought it's just some random & transient compiler glitches.
Author
Owner

@j4james commented on GitHub (Oct 16, 2020):

I suppose it could be a transient error - I have had issues like that before - but I can usually get them to resolve by rebuilding a few times. This error just isn't going away for me, no matter how many times I rebuild.

@j4james commented on GitHub (Oct 16, 2020): I suppose it could be a transient error - I have had issues like that before - but I can usually get them to resolve by rebuilding a few times. This error just isn't going away for me, no matter how many times I rebuild.
Author
Owner

@skyline75489 commented on GitHub (Oct 19, 2020):

I figured it out. It's because FuzzWrapper does not have ConTypes.lib as its dependency. Thus the linker could not find the symbols needed.

@skyline75489 commented on GitHub (Oct 19, 2020): I figured it out. It's because `FuzzWrapper` does not have `ConTypes.lib` as its dependency. Thus the linker could not find the symbols needed.
Author
Owner

@zadjii-msft commented on GitHub (Oct 19, 2020):

Ah, that's certainly weird, and explains why it might be hitting so inconsistently. ConTypes is used by just about every project, so by building any other project, you've probably built contypes already.

@zadjii-msft commented on GitHub (Oct 19, 2020): Ah, that's certainly weird, and explains why it might be hitting so inconsistently. ConTypes is used by just about every project, so by building _any other project_, you've probably built contypes already.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#11037