MSVC Find where a symbol is coming from

Viewed 888

Situation:

  • I am using CI to compile a Windows version of my project using CMake and MSVC
  • It errors out right at the end complaining of two missing symbols (__std_system_error_allocate_message and __std_system_error_deallocate_message)
  • When I replicate the build process on my own computer, the build finishes fine and the artifacts run without errors.
  • Searching for these symbols on Google yields no clues as to which libraries they are supposed to be defined in.

Which leads to my question:

  • Is it possible to see where the MSVC linker is finding a particular symbol?
  • I was able to find instructions to look at what symbols are defined in a particular library, but this project is linking dozens of libraries, and the ones I have searched so far do not define the symbol. I think this approach is prone to errors as I might miss a library without knowing it.
1 Answers

@Richard Critten pointed me on the right path, the problem was due to having different versions of the MSVC toolchain on each system. GitLab's CI runners were using build tools version 16.2.3.0 while I was using a more recent 16.6.1.0. Uninstalling that and installing 16.2.3 from this page reproduced the error. Recompiling a dependency I had previously compiled with the newer toolchain then resolved the error on both systems.

Related