Please help, I have spent all day trying to make my c++ app compile.
My project contains one source file: Foo.cpp. Here is its code:
#include
Running cl.exe directly requires that environment variables are set that point to libraries and tools. To get an idea of what variables need installed and what their values should be, I recommend installing Microsoft Visual C++ Compiler for Python 2.7. It adds command prompts to the start menu which automatically load the needed environment variables.
After running the prompt, run set
to see all of the environment variables.
Examples:
LIB=C:\Users\JBeach\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\VC\Lib;C:\Users\JBeach\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\WinSDK\Lib;
LIBPATH=C:\Users\JBeach\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\VC\Lib;C:\Users\JBeach\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\WinSDK\Lib;
PROCESSOR_ARCHITECTURE=x86
PROCESSOR_ARCHITEW6432=AMD64
VCINSTALLDIR=C:\Users\JBeach\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\VC\
WindowsSdkDir=C:\Users\JBeach\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\WinSDK\