C++ und Visual Studio 2015 : Standard Libraries not found: stdio.h / cerrno.h / float.h / math.h … not found | Simple „Hello world!“ program not working

Problem

You have installed Visual Studio 2015 (Community Edition) and you are unable to compile a simple „Hello World!“ program using C++.

Nach der Installation von Visual Studio 2015 (Community Edition) lässt sich nicht mal ein simples „Hello World!“ Programm erstellen.

Analysis – Analyse

According to Microsofts article https://blogs.msdn.microsoft.com/vcblog/2015/03/03/introducing-the-universal-crt/ the headers, sources, and libraries are now distributed as part of a separate Universal CRT SDK. This SDK is included with Visual Studio; it is installed by default to C:\Program Files (x86)\Windows Kits\10. The debug ucrtbased.dll is also included as part of this SDK and is installed to the system directory.

Microsoft erwähnt in seinem Artikel https://blogs.msdn.microsoft.com/vcblog/2015/03/03/introducing-the-universal-crt/, dass die Header-Bibliotheken als Teil eines seperaten universellen C-Runtime SDK ausgefliefert werden, welches Standardmäßig mit Visual Studio 2015 in C:\Program Files (x86)\Windows Kits\10 installiert wird. Die ucrtbased.dll-Datei, welche auch Teil des SDKs ist, wird in das Systemverzeichnis kopiert.

Lösung – Solution

Der Bildschirm nach dem Kompilieren (orange) – Visual Studio 2015 findet 460 Fehler.
Screenshot after the compilation progress (orange) – Visual Studio 2015 is reporting 460 Errors.

errors

Rot: Um das Problem zu lösen -> Rechtsklick auf Projekt -> „Eigenschaften“ wählen.
Red: To solve the problem rightclick the project  and select „Properties“.

Library Path: C:\Program Files\Windows Kits\10\Lib\10.0.10150.0\ucrt\x86

pfad1

Danach müssen wir analog dazu den Include-Pfad (wieder mit einem Projekt-Rechtsklick -> Eigenschaften) einrichten.

After that we have to configure a second path to the Include-Directory in the same way (Rightclick project -> properties)

Include Path: C:\Program Files\Windows Kits\10\Include\10.0.10150.0\ucrt

path2

Nun kann man trotz der Anzeigen von Fehlern das Projekt einfach kompilieren, nach dem ersten Kompilier- oder Erstellvorgang sind die Fehlermeldungen in der Regel verschwunden.

Now you can hit the Run-Button / Recreate the project / Recompile it. After that the other errors should disapear.

helloworldcpp

Schreibe einen Kommentar

Deine E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind mit * markiert

Diese Website verwendet Akismet, um Spam zu reduzieren. Erfahre mehr darüber, wie deine Kommentardaten verarbeitet werden.