The missing output
std::cout
is buffered, meaning that it won't display data right away - even if you write to it. To get around the problem of the application potentially not printing anything you should add a new-line after your stated output, or flush it using std::endl
or equivalent.
std::cout << "hello world" << std::endl; // new-line, and flush
The diagnostic
The diagnostic you are referring to is not an error, but a mere warning/informational message.
It's related to incremental linking, which is a feature used by the compiler to get around the problem of having to rebuild every source involved each time you compile your application. If the linker cannot find a previous compiled exe, or there is some other issue, it will issue the stated diagnostic as if saying; "I need to do a full rebuild, hold on tight".
More can be read in the following Q&A:
As stated by the documentation:
Additionally, LINK performs a full link if any of the following
situations occur:
The incremental status (.ilk) file is missing. (LINK creates a new .ilk file in preparation for subsequent incremental linking.)
There is no write permission for the .ilk file. (LINK ignores the .ilk file and links nonincrementally.)
The .exe or .dll output file is missing.
The timestamp of the .ilk, .exe, or .dll is changed.
A LINK option is changed. Most LINK options, when changed between builds, cause a full link.
- An object (.obj) file is added or omitted.
What if I don't want incremental linking, and the diagnostic?
If you'd like to disable incremental linking you can do so by going into the project properties and remove /INCREMENTAL
.
See the documentation: