I finally got the x86 (Win32) build to complete without errors: Install VS 2015, test with HelloWorld on Win32 and X64, Install git, Cmake, Git opencv to D:\opencv_get\opencv, configure VS paths and includes, build x86 debug, release and install, no errors. Use Configuration Manager to change the projects target to X64, clean and build, 59 errors: Error LNK1112 module machine type 'x64' conflicts with target machine type 'X86' zlib D:\opencv_git\opencv\mybuild\3rdparty\zlib\x64\Debug\adler32.obj 1 NOTE there is 6 c source files and only this one fails or it is the first....
Close Project and Open only zilb Everything says I'm building X64 but the obj file must be Win32. Other files that failed without the 32 in their name do the same thing, fail.
After several hours of shear enjoyment: Click on your project - zlib, tight click to properties, on the zlib Property Pages: Configuration Properties / Librarian / All Options / Additional Library Directories I found /machine:X86 %(AdditionalOptions) for a X64 build /machine:X64 %(AdditionalOptions)
So after 18 years Microsft still can't figure out how to build a tool, when I told VS to build X64 at the project level I meant change all so my project would compile without me having to look/touch every setting.