<div dir="auto">Hi Gonzalo,<div dir="auto"><br></div><div dir="auto">Zlib has a C interface (or rather, its all C) so a version of it built with vc2013 can work with c++ code built with vs2015. But this probably means that you need both redistributables installed on the target machine (2013 and 2015). Id make sure you install both runtimes unless you build zlib with 2015.</div><div dir="auto"><br></div><div dir="auto">As for the rest, Id still try to make sure the application is built in an environment where the 8.1 SDK is used as opposed to the 10.0 one. </div><div dir="auto"><br></div><div dir="auto">At this link with examples to environment variables set for an older version of visual studio, <a href="http://blog.bfitz.us/?p=2369">http://blog.bfitz.us/?p=2369</a>. Notice how some of them point to:   C:\Program Files (x86)\Windows Kits\8.1</div><div dir="auto"><br></div><div dir="auto">You could verify whether these are correctly set up by printing them on the console, e.g. `echo %LIB%`</div><div dir="auto"><br></div><div dir="auto">If windows 10 sdk is used instead I suspect thst could be a problem. Alternatively, you can the visual studio generator in cmake, instead of ninja, open the solution, and in the project properties check which "target platform" is displayed and whether 8.1 is an option.</div><div dir="auto"><br></div><div dir="auto">According to Microsoft's documentation SDK 8.1 would be the one to target vista, 7, server 2008, etc (<a href="https://msdn.microsoft.com/en-us/library/8x480de8.aspx">https://msdn.microsoft.com/en-us/library/8x480de8.aspx</a>). You may also need to add your define in "targetver.h" rather than defining it through command line, but I am unsure about this.</div><div dir="auto"><br></div><div dir="auto">Regards,</div><div dir="auto">Luis</div><div dir="auto"><br></div><div dir="auto"><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On 21 Sep 2017 22:40, "Gonzalo Garramuño" <<a href="mailto:ggarra13@gmail.com">ggarra13@gmail.com</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
<br>
El 21/09/2017 a las 11:08, Luis Caro Campos escribió:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi Gonzalo,<br>
<br>
Since you are using ninja files and building from command line, I suspect you are using a Visual Studio 2015 command prompt.<br>
<br>
It may be beneficial to initialise a command prompt to specifically target Windows 8.1 SDK which is the one to go to target Windows 7.<br>
<br>
First, make sure Windows 8.1 SDK is installed (can't remember but it is likely that the visual studio 2015 installer can help).<br>
<br>
Then open a command prompt and run the vcvarsall.bat passing arguments "x64 8.1" if you are building on a 64-bit install of windows targeting 64-bit windows.<br>
<br>
Then run cmake and ninja from there, and I suspect there's a chance the produced binaries will no longer depend on those files. Like you mentioned, those files are not redistributable by developers.<br>
<br>
My vcvarsall.bat is located at:<br>
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC<br>
<br>
Regards,<br>
Luis<br>
</blockquote>
Thank you Luis for your help.  I found out why the application was failing in Windows7 32-bits.  The problems was a zlib file that was compiled with the MSVC2015 compiler while the rest was compiled with MSVC2013.  That was triggering the api-ms-core-runtime-l1-2-0.dll error.   Talk about a helpful message.<br>
<br>
Yet, I am puzzled still with the Windows 7 64 bits version of my program.  Disting many of the api-ms-core* and api-ms-crt* makes my program work.  Here, as far as I can tell, it was compiled with the MSVC2015 with the -D_WIN32_WINNT=0x0501 to target the least OS. However some of the dependant libraries surely not have that -D define.<br>
It would be helpful if I knew what files are part of the universal c runtime.  Currently I think: concrt140.dll, ucrtbase.dll, msvcp140.dll, vccorlib140.dll, vcomp140.dll, vcruntime140.dll.  I exclude all the MFC dlls as I am not using them.<br>
<br>
-- <br>
Gonzalo Garramuño<br>
<br>
</blockquote></div></div>