0

First time using Visual C++ in Visual Studio and I'm trying to teach myself C++ from some books. I am just trying to do a basic "Hello World" program and its getting a couple errors that I don't know anything about, as well as a bizarre warning. The missing source file seems to be standard and I can't figure it out.

The errors:

Error   2   error : Required file "tracker.exe" is missing.
Error   3   IntelliSense: cannot open source file "SDKDDKVer.h"

The warning:

warning MSB8003: Could not find WindowsSDKDir variable from the registry.  TargetFrameworkVersion or PlatformToolset may be set to an invalid version number.

The code:

#include "stdafx.h"
#include <iostream>
using namespace std;
int main()          
{
    cout << "Hello World!" ;


    // This prevents the Console Window from closing during debug mode
    cin.ignore(cin.rdbuf()->in_avail());
    cout << "\nPress only the 'Enter' key to exit program: ";
    cin.get();

    return 0;
}

Any explanations or help would be huge! Thanks.

Zong
  • 6,160
  • 5
  • 32
  • 46
jacksonSD
  • 677
  • 2
  • 13
  • 27
  • Possible duplicate of http://stackoverflow.com/questions/13422178/visual-studio-2012-required-file-tracker-exe-is-missing. There is also an answer for it. – Kiril May 20 '14 at 09:21

1 Answers1

0

Here's a standard C++03 "hello, world!":

#include <iostream>
using namespace std;

int main()
{
    cout << "Hello, world!" << endl;
}

Turn off precompiled headers in the project settings. Make that compile without adding anything. Run it via Ctrl F5 (alternatively place a breakpoint on the final } and run it via the debugger, e.g. keypress F5).

If that doesn't work then you have configuration error. Then try first a new project. If that doesn't work, uninstall VS and reinstall it.

Cheers and hth. - Alf
  • 142,714
  • 15
  • 209
  • 331