Skip to content

Build Failures: VS 2022 & "master" (1.14.5.0) #106

Open

Description

@chuckchopp

I cloned the repo from the "master" branch, which is presumably the same as tag "1.14.5.0", and am trying to build it on a Windows 10 system using Visual Studio 2022. The build is failing with the following errors:

` 13>Project "C:\VolData01\DevProjects\FastBinaryEncoding\temp\protoex.fbe_TARGET.vcxproj" (13) is building "C:\V
olData01\DevProjects\FastBinaryEncoding\temp\fbec.vcxproj" (16) on node 1 (default targets).
16>PrepareForBuild:
Creating directory "fbec.dir\RelWithDebInfo".
Structured output is enabled. The formatting of compiler diagnostics will reflect the error hierarchy. See htt
ps://aka.ms/cpp/structured-output for more details.
Creating directory "C:\VolData01\DevProjects\FastBinaryEncoding\temp\RelWithDebInfo".
Creating directory "fbec.dir\RelWithDebInfo\fbec.tlog".
InitializeBuildStatus:
Creating "fbec.dir\RelWithDebInfo\fbec.tlog\unsuccessfulbuild" because "AlwaysCreate" was specified.
Touching "fbec.dir\RelWithDebInfo\fbec.tlog\unsuccessfulbuild".
CustomBuild:
[BISON][parser] Building parser with bison 3.7.4
[FLEX][lexer] Building scanner with win_flex 2.6.4
win_flex.exe version 2.6.4 usage statistics:
scanner options: -vI8 -Cem -oC:/VolData01/DevProjects/R&D/FastBinaryEncoding/source/fbe-lexer.cpp
590/2000 NFA states
250/1000 DFA states (1350 words)
76 rules
Compressed tables always back-up
1/40 start conditions
273 epsilon states, 113 double epsilon states
36/100 character classes needed 274/500 words of storage, 0 reused
6822 state/nextstate pairs created
649/6173 unique/duplicate transitions
265/1000 base-def entries created
496/2000 (peak 1128) nxt-chk entries created
165/2500 (peak 945) template nxt-chk entries created
0 empty table entries
18 protos created
15 templates created, 184 uses
63/256 equivalence classes created
11/256 meta-equivalence classes created
1 (1 saved) hash collisions, 402 DFAs equal
0 sets of reallocations needed
1841 total table entries needed
Building Custom Rule C:/VolData01/DevProjects/R&D/FastBinaryEncoding/CMakeLists.txt
ComputeStdModulesCompileInputs:
Reading library manifest file 'C:\Program Files\Microsoft Visual Studio\2022\Professional\VC\Tools\MSVC\14.43.
34808\modules\modules.json' which provides data for library 'microsoft/STL'.
Adding module source 'C:\Program Files\Microsoft Visual Studio\2022\Professional\VC\Tools\MSVC\14.43.34808\mod
ules\std.ixx' from library 'microsoft/STL' to be built with this project.
Adding module source 'C:\Program Files\Microsoft Visual Studio\2022\Professional\VC\Tools\MSVC\14.43.34808\mod
ules\std.compat.ixx' from library 'microsoft/STL' to be built with this project.
MakeDirsForCl:
Creating directory "C:\VolData01\DevProjects\FastBinaryEncoding\temp\fbec.dir\RelWithDebInfo\microsoft\STL
".
SetModuleDependencies:
Creating directory "fbec.dir\RelWithDebInfo\fbec_MD.tlog".
ClCompile:
C:\Program Files\Microsoft Visual Studio\2022\Professional\VC\Tools\MSVC\14.43.34808\bin\HostX64\x64\CL.exe /c
/I"C:\VolData01\DevProjects\FastBinaryEncoding\include" /I"C:\VolData01\DevProjects\FastBinaryEncodin
g\modules\CppCommon\include" /I"C:\VolData01\DevProjects\FastBinaryEncoding\modules\CppCommon\modules\vld
bin" /I"C:\VolData01\DevProjects\FastBinaryEncoding\modules\CppCommon\modules\fmt\include" /I"C:\VolData01
\DevProjects\FastBinaryEncoding\modules\cpp-optparse" /Zi /nologo /W4 /WX /diagnostics:column /O2 /Ob1 /D
_MBCS /D WIN32 /D _WINDOWS /D NDEBUG /D WIN32_LEAN_AND_MEAN /D _CRT_SECURE_NO_DEPRECATE /D SILENCE_ALL_CXX17
DEPRECATION_WARNINGS /D _WIN32_WINNT=0x0A00 /D _WIN32_SDK=22621 /D "CMAKE_INTDIR="RelWithDebInfo"" /Gm- /EHs
c /MD /GS /fp:precise /Zc:wchar_t /Zc:forScope /Zc:inline /std:c++latest /Fo"fbec.dir\RelWithDebInfo\" /Fd"fb
ec.dir\RelWithDebInfo\vc143.pdb" /external:W0 /Gd /TP /wd4100 /wd4250 /wd4005 /wd4065 /wd4127 /wd4244 /wd4505
/wd4702 /errorReport:queue /external:I "C:/VolData01/DevProjects/R&D/FastBinaryEncoding/modules" /bigobj /utf
-8 /Zc:__cplusplus "C:\VolData01\DevProjects\FastBinaryEncoding\source\fbe-lexer.cpp" "C:\VolData01\DevPro
jects\FastBinaryEncoding\source\fbe-parser.cpp" "C:\VolData01\DevProjects\FastBinaryEncoding\source\fb
e.cpp" "C:\VolData01\DevProjects\FastBinaryEncoding\source\generator.cpp" "C:\VolData01\DevProjects\Fa
stBinaryEncoding\source\generator_cpp.cpp" "C:\VolData01\DevProjects\FastBinaryEncoding\source\generator_c
sharp.cpp" "C:\VolData01\DevProjects\FastBinaryEncoding\source\generator_go.cpp" "C:\VolData01\DevProjects
\FastBinaryEncoding\source\generator_java.cpp" "C:\VolData01\DevProjects\FastBinaryEncoding\source\gen
erator_javascript.cpp" "C:\VolData01\DevProjects\FastBinaryEncoding\source\generator_kotlin.cpp" "C:\VolDa
ta01\DevProjects\FastBinaryEncoding\source\generator_python.cpp" "C:\VolData01\DevProjects\FastBinaryE
ncoding\source\generator_ruby.cpp" "C:\VolData01\DevProjects\FastBinaryEncoding\source\generator_swift.cpp
"
fbe-lexer.cpp
fbe-parser.cpp
fbe.cpp
generator.cpp
generator_cpp.cpp
generator_csharp.cpp
generator_go.cpp
generator_java.cpp
generator_javascript.cpp
generator_kotlin.cpp
generator_python.cpp
generator_ruby.cpp
generator_swift.cpp
Generating Code...
Link:
C:\Program Files\Microsoft Visual Studio\2022\Professional\VC\Tools\MSVC\14.43.34808\bin\HostX64\x64\link.exe
/ERRORREPORT:QUEUE /OUT:"C:\VolData01\DevProjects\FastBinaryEncoding\temp\RelWithDebInfo\fbec.exe" /INCREM
ENTAL /ILK:"fbec.dir\RelWithDebInfo\fbec.ilk" /NOLOGO modules\CppCommon\RelWithDebInfo\cppcommon.lib "modules
RelWithDebInfo\cpp-optparse.lib" "C:\Program Files (x86)\Windows Kits\10\Lib\10.0.22621.0\um\x86\DbgHelp.Lib"
"C:\Program Files (x86)\Windows Kits\10\Lib\10.0.22621.0\um\x86\RpcRT4.Lib" "C:\Program Files (x86)\Windows Ki
ts\10\Lib\10.0.22621.0\um\x86\UserEnv.Lib" modules\CppCommon\modules\RelWithDebInfo\fmt.lib kernel32.lib user3
2.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib /MANIFEST /
MANIFESTUAC:"level='asInvoker' uiAccess='false'" /manifest:embed /DEBUG /PDB:"C:/VolData01/DevProjects/R&D/Fas
tBinaryEncoding/temp/RelWithDebInfo/fbec.pdb" /SUBSYSTEM:CONSOLE /TLBID:1 /DYNAMICBASE /NXCOMPAT /IMPLIB:"C:/V
olData01/DevProjects/R&D/FastBinaryEncoding/temp/RelWithDebInfo/fbec.lib" /MACHINE:X64 /machine:x64 "fbec.dir
\RelWithDebInfo\fbe-lexer.obj"
"fbec.dir\RelWithDebInfo\fbe-parser.obj"
fbec.dir\RelWithDebInfo\fbe.obj
fbec.dir\RelWithDebInfo\generator.obj
fbec.dir\RelWithDebInfo\generator_cpp.obj
fbec.dir\RelWithDebInfo\generator_csharp.obj
fbec.dir\RelWithDebInfo\generator_go.obj
fbec.dir\RelWithDebInfo\generator_java.obj
fbec.dir\RelWithDebInfo\generator_javascript.obj
fbec.dir\RelWithDebInfo\generator_kotlin.obj
fbec.dir\RelWithDebInfo\generator_python.obj
fbec.dir\RelWithDebInfo\generator_ruby.obj
fbec.dir\RelWithDebInfo\generator_swift.obj
16>cppcommon.lib(path.obj) : error LNK2019: unresolved external symbol __imp_GetUserProfileDirectoryW referenced in
function "public: static class CppCommon::Path __cdecl CppCommon::Path::home(void)" (?home@Path@CppCommon@@sa?A
V12@XZ) [C:\VolData01\DevProjects\FastBinaryEncoding\temp\fbec.vcxproj]
16>cppcommon.lib(uuid.obj) : error LNK2019: unresolved external symbol __imp_UuidCreate referenced in function "pub
lic: static class CppCommon::UUID __cdecl CppCommon::UUID::Random(void)" (?Random@UUID@CppCommon@@sa?AV12@XZ) [C
:\VolData01\DevProjects\FastBinaryEncoding\temp\fbec.vcxproj]
16>cppcommon.lib(uuid.obj) : error LNK2019: unresolved external symbol __imp_UuidCreateSequential referenced in fun
ction "public: static class CppCommon::UUID __cdecl CppCommon::UUID::Sequential(void)" (?Sequential@UUID@CppComm
on@@sa?AV12@XZ) [C:\VolData01\DevProjects\FastBinaryEncoding\temp\fbec.vcxproj]
16>cppcommon.lib(stack_trace.obj) : error LNK2019: unresolved external symbol __imp_UnDecorateSymbolName referenced
in function "public: __cdecl CppCommon::StackTrace::StackTrace(int)" (??0StackTrace@CppCommon@@qeaa@H@Z) [C:\Vo
lData01\DevProjects\FastBinaryEncoding\temp\fbec.vcxproj]
16>cppcommon.lib(stack_trace.obj) : error LNK2019: unresolved external symbol __imp_SymGetModuleInfo64 referenced i
n function "public: __cdecl CppCommon::StackTrace::StackTrace(int)" (??0StackTrace@CppCommon@@qeaa@H@Z) [C:\VolD
ata01\DevProjects\FastBinaryEncoding\temp\fbec.vcxproj]
16>cppcommon.lib(stack_trace.obj) : error LNK2019: unresolved external symbol __imp_SymGetLineFromAddr64 referenced
in function "public: __cdecl CppCommon::StackTrace::StackTrace(int)" (??0StackTrace@CppCommon@@qeaa@H@Z) [C:\Vo
lData01\DevProjects\FastBinaryEncoding\temp\fbec.vcxproj]
16>cppcommon.lib(stack_trace.obj) : error LNK2019: unresolved external symbol __imp_SymFromAddr referenced in funct
ion "public: __cdecl CppCommon::StackTrace::StackTrace(int)" (??0StackTrace@CppCommon@@qeaa@H@Z) [C:\VolData01\D
evProjects\FastBinaryEncoding\temp\fbec.vcxproj]
16>C:\Program Files (x86)\Windows Kits\10\Lib\10.0.22621.0\um\x86\DbgHelp.Lib : warning LNK4272: library machine ty
pe 'x86' conflicts with target machine type 'x64' [C:\VolData01\DevProjects\FastBinaryEncoding\temp\fbec.vcx
proj]
16>C:\Program Files (x86)\Windows Kits\10\Lib\10.0.22621.0\um\x86\RpcRT4.Lib : warning LNK4272: library machine typ
e 'x86' conflicts with target machine type 'x64' [C:\VolData01\DevProjects\FastBinaryEncoding\temp\fbec.vcxp
roj]
16>C:\Program Files (x86)\Windows Kits\10\Lib\10.0.22621.0\um\x86\UserEnv.Lib : warning LNK4272: library machine ty
pe 'x86' conflicts with target machine type 'x64' [C:\VolData01\DevProjects\FastBinaryEncoding\temp\fbec.vcx
proj]
16>C:\VolData01\DevProjects\FastBinaryEncoding\temp\RelWithDebInfo\fbec.exe : fatal error LNK1120: 7 unresolved
externals [C:\VolData01\DevProjects\FastBinaryEncoding\temp\fbec.vcxproj]
16>Done Building Project "C:\VolData01\DevProjects\FastBinaryEncoding\temp\fbec.vcxproj" (default targets) -- F
AILED.
13>Done Building Project "C:\VolData01\DevProjects\FastBinaryEncoding\temp\protoex.fbe_TARGET.vcxproj" (default
targets) -- FAILED.
10>Done Building Project "C:\VolData01\DevProjects\FastBinaryEncoding\temp\fbe-example-create.vcxproj" (default
targets) -- FAILED.
1>Done Building Project "C:\VolData01\DevProjects\FastBinaryEncoding\temp\ALL_BUILD.vcxproj" (default targets)
-- FAILED.

Build FAILED.

   "C:\VolData01\DevProjects\FastBinaryEncoding\temp\ALL_BUILD.vcxproj" (default target) (1) ->
   "C:\VolData01\DevProjects\FastBinaryEncoding\temp\fbe-example-create.vcxproj" (default target) (10) ->
   "C:\VolData01\DevProjects\FastBinaryEncoding\temp\protoex.fbe_TARGET.vcxproj" (default target) (13) ->
   "C:\VolData01\DevProjects\FastBinaryEncoding\temp\fbec.vcxproj" (default target) (16) ->
   (Link target) ->
     C:\Program Files (x86)\Windows Kits\10\Lib\10.0.22621.0\um\x86\DbgHelp.Lib : warning LNK4272: library machine
   type 'x86' conflicts with target machine type 'x64' [C:\VolData01\DevProjects\FastBinaryEncoding\temp\fbec.v
   cxproj]
     C:\Program Files (x86)\Windows Kits\10\Lib\10.0.22621.0\um\x86\RpcRT4.Lib : warning LNK4272: library machine t
   ype 'x86' conflicts with target machine type 'x64' [C:\VolData01\DevProjects\FastBinaryEncoding\temp\fbec.vc
   xproj]
     C:\Program Files (x86)\Windows Kits\10\Lib\10.0.22621.0\um\x86\UserEnv.Lib : warning LNK4272: library machine
   type 'x86' conflicts with target machine type 'x64' [C:\VolData01\DevProjects\FastBinaryEncoding\temp\fbec.v
   cxproj]


   "C:\VolData01\DevProjects\FastBinaryEncoding\temp\ALL_BUILD.vcxproj" (default target) (1) ->
   "C:\VolData01\DevProjects\FastBinaryEncoding\temp\fbe-example-create.vcxproj" (default target) (10) ->
   "C:\VolData01\DevProjects\FastBinaryEncoding\temp\protoex.fbe_TARGET.vcxproj" (default target) (13) ->
   "C:\VolData01\DevProjects\FastBinaryEncoding\temp\fbec.vcxproj" (default target) (16) ->
   (Link target) ->
     cppcommon.lib(path.obj) : error LNK2019: unresolved external symbol __imp_GetUserProfileDirectoryW referenced
   in function "public: static class CppCommon::Path __cdecl CppCommon::Path::home(void)" (?home@Path@CppCommon@@SA
   ?AV12@XZ) [C:\VolData01\DevProjects\FastBinaryEncoding\temp\fbec.vcxproj]
     cppcommon.lib(uuid.obj) : error LNK2019: unresolved external symbol __imp_UuidCreate referenced in function "p
   ublic: static class CppCommon::UUID __cdecl CppCommon::UUID::Random(void)" (?Random@UUID@CppCommon@@SA?AV12@XZ)
   [C:\VolData01\DevProjects\FastBinaryEncoding\temp\fbec.vcxproj]
     cppcommon.lib(uuid.obj) : error LNK2019: unresolved external symbol __imp_UuidCreateSequential referenced in f
   unction "public: static class CppCommon::UUID __cdecl CppCommon::UUID::Sequential(void)" (?Sequential@UUID@CppCo
   mmon@@SA?AV12@XZ) [C:\VolData01\DevProjects\FastBinaryEncoding\temp\fbec.vcxproj]
     cppcommon.lib(stack_trace.obj) : error LNK2019: unresolved external symbol __imp_UnDecorateSymbolName referenc
   ed in function "public: __cdecl CppCommon::StackTrace::StackTrace(int)" (??0StackTrace@CppCommon@@QEAA@H@Z) [C:\
   VolData01\DevProjects\FastBinaryEncoding\temp\fbec.vcxproj]
     cppcommon.lib(stack_trace.obj) : error LNK2019: unresolved external symbol __imp_SymGetModuleInfo64 referenced
    in function "public: __cdecl CppCommon::StackTrace::StackTrace(int)" (??0StackTrace@CppCommon@@QEAA@H@Z) [C:\Vo
   lData01\DevProjects\FastBinaryEncoding\temp\fbec.vcxproj]
     cppcommon.lib(stack_trace.obj) : error LNK2019: unresolved external symbol __imp_SymGetLineFromAddr64 referenc
   ed in function "public: __cdecl CppCommon::StackTrace::StackTrace(int)" (??0StackTrace@CppCommon@@QEAA@H@Z) [C:\
   VolData01\DevProjects\FastBinaryEncoding\temp\fbec.vcxproj]
     cppcommon.lib(stack_trace.obj) : error LNK2019: unresolved external symbol __imp_SymFromAddr referenced in fun
   ction "public: __cdecl CppCommon::StackTrace::StackTrace(int)" (??0StackTrace@CppCommon@@QEAA@H@Z) [C:\VolData01
   \DevProjects\FastBinaryEncoding\temp\fbec.vcxproj]
     C:\VolData01\DevProjects\FastBinaryEncoding\temp\RelWithDebInfo\fbec.exe : fatal error LNK1120: 7 unresolv
   ed externals [C:\VolData01\DevProjects\FastBinaryEncoding\temp\fbec.vcxproj]

3 Warning(s)
8 Error(s)`

Activity

  1. chuckchopp commented on Mar 21, 2025

    @chuckchopp
    Author

    Additionally, to even get that far in the build process, I had to modify "format.inl" and replace 2 occurrences of "vprint<wchar_t>" with "vprint" to eliminate numerous compiler errors.

  2. chuckchopp commented on Mar 21, 2025

    @chuckchopp
    Author

    It looks like the underlying problem is that something keeps using hard coded paths to an "x86" folder rather than the "x64" folder for the 3 linker library files involved with the missing external symbols:

    "C:\Program Files (x86)\Windows Kits\10\Lib\10.0.22621.0\um\x86\DbgHelp.Lib"
    "C:\Program Files (x86)\Windows Kits\10\Lib\10.0.22621.0\um\x86\RpcRT4.Lib"
    "C:\Program Files (x86)\Windows Kits\10\Lib\10.0.22621.0\um\x86\UserEnv.Lib"

    Even after updating the linker input settings for the "fbec" project in the "FastBinaryEncoding" solution file, the command line build initiated by executing "VS.bat" is still failing with the same errors. Something is definitely misconfigured in the build scripts for Visual Studio.

  3. chuckchopp commented on Mar 21, 2025

    @chuckchopp
    Author

    The following were required to work around the problem:

    1. Do not use the Visual Studio 2022 menu item "Tools -> Command Line -> Developer Command Prompt" to open the console window where VS.bat will be executed. Even when the solution has x64 selected as architecture in the build configuration, the values of VSCMD_ARG_HOST_ARCH and VSCMD_ARG_TGT_ARCH are both set to "x86". Instead, use the "x64 Native Tools Command Prompt for VS 2022" from the start menu.
    2. If VS.bat has been executed one or more times with the incorrect developer command prompt settings, delete the content of the "temp" directory.
    3. In the console window, use the command "SET CMAKE_LIBRARY_PATH=%WindowsSdkDir%%WindowsSDKVersion%um\x64" before executing VS.bat. Surprisingly, the Google search results which turned up this required step referred to the same type of problem occurring with a different GitHub project belonging to "chronoxor". Refer to https://github.com/chronoxor/CppServer/issues/51 for more information.

    After performing those steps, I was able to execute VS.bat and produce a successful build.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions