0

I had a Jenkins VM setup to build project however it suddenly failed one day when building solutions from commandline like this:

devenv.com /useenv /build "Release|x64" "build\myproject.sln"

It's giving errors like:

error C3861: 'IN6_IS_ADDR_MULTICAST': identifier not found
error C2065: 'in6addr_any': undeclared identifier

In other words, it's missing something from Windows SDK?

However if I logged onto the VM and build the solution from visual studio 2017 IDE and it can built successfully.

Does anybody know how it failed to build from commandline?

John Yang
  • 547
  • 1
  • 8
  • 21
  • The error C3861 is due to missing relevant header files. Did the error indicate which file the problem is in? – Minxin Yu - MSFT Nov 11 '22 at 01:58
  • @MinxinYu-MSFT It didn't say which file is missing but probably ws2ipdef.h in windows sdk as it's missing definition of IN6_IS_ADDR_MULTICAST. However the exact same code builds when I open the solution in Visual Studio. It just failed under command line. This whole project built before until I added a library that requires IN6_IS_ADDR_MULTICAST definition. – John Yang Nov 13 '22 at 23:04
  • I ended up using msbuild "build\myproject.sln" /t:build /p:Configuration=Release /p:platform=x64 This seemed to resolve all issues for some reason. I was fiddling with msbuild earlier and it can throw the same error as above, but for some reason the above line can get it through. – John Yang Nov 16 '22 at 23:40

0 Answers0