Probleme beim Einstellen von VC++ Express
-
Es war grundsätzlich in dem Anwendugsskelett dass einem VC++ für eine Windowsanwendung aufbaut keins von beidem includiert, nur die Projekt-Include Datei und <stdafx.h>. Ich dachte bei einer von den beiden ist wiederrum Windows.h dabei, aber auch wenn ich Windows.h selber includiere (mit oder ohne <> oder "") funktioniert es nicht.
-
Wenn der Compiler eine Datei nicht finden kann, dann kann es mit sicherheit nicht an der Datei liegen, weil sonst könnte er sie ja finden. Ein <> oder "" spielt in dem Fall auch keine Rolle, da die windows.h ja nicht im Projektverzeichnis liegt.
-
Hm mir fällt sonst einfach nichts mehr ein, hab die SDK jetzt so oft neu installiert und die Pfade immer wieder eingegeben

-
Mir fällt auch nichts ein... Du brauchst das PSDK nicht dauerd neu zu installieren... er muss zuerst mal die windows.h finden... Hast Du vielleicht ein x64 OS?
-
Nope das wars leider auch nicht.
Das gibt der Debugger aus:
------ Build started: Project: TestProjekt1, Configuration: Debug Win32 ------
Compiling...
stdafx.cpp
c:\dokumente und einstellungen\jj\eigene dateien\visual studio 2005\projects\testprojekt1\testprojekt1\stdafx.h(28) : fatal error C1083: Cannot open include file: 'windows.h': No such file or directory
Build log was saved at "file://c:\Dokumente und Einstellungen\jj\Eigene Dateien\Visual Studio 2005\Projects\TestProjekt1\TestProjekt1\Debug\BuildLog.htm"
TestProjekt1 - 1 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========Und bei dem Anwendungsgerüst waren diese Datein includiert:
#include "stdafx.h"
#include "TestProjekt1.h"
-
Zeig uns bitte mal testprojekt1\stdafx.h.
-
Das ist der Inhalt der Datei:
// stdafx.h : include file for standard system include files,
// or project specific include files that are used frequently, but
// are changed infrequently
//#pragma once
// Modify the following defines if you have to target a platform prior to the ones specified below.
// Refer to MSDN for the latest info on corresponding values for different platforms.
#ifndef WINVER // Allow use of features specific to Windows XP or later.
#define WINVER 0x0501 // Change this to the appropriate value to target other versions of Windows.
#endif#ifndef _WIN32_WINNT // Allow use of features specific to Windows XP or later.
#define _WIN32_WINNT 0x0501 // Change this to the appropriate value to target other versions of Windows.
#endif#ifndef _WIN32_WINDOWS // Allow use of features specific to Windows 98 or later.
#define _WIN32_WINDOWS 0x0410 // Change this to the appropriate value to target Windows Me or later.
#endif#ifndef _WIN32_IE // Allow use of features specific to IE 6.0 or later.
#define _WIN32_IE 0x0600 // Change this to the appropriate value to target other versions of IE.
#endif#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
// Windows Header Files:
#include <windows.h>// C RunTime Header Files
#include <stdlib.h>
#include <malloc.h>
#include <memory.h>
#include <tchar.h>// TODO: reference additional headers your program requires here
-
Hmm mal eine ganz blöde Frage:
Ich hab in dem Testprojekt einfach mal #include "stdafx.h" auskommentriert und selbst include <windows.h> eingefügt.Da kommt dann aber die selbe Meldung dass in stdafx.h die Datei windows.h nicht includiert werden kann. Wie kann denn das sein, wenn in dem Projekt nirgends mehr stdafix vorkommt?
-
IMHO liegt es mit 100%iger Wahrscheinlichkeit an den Pfadeinstellungen...
-
Jop, wie man 10mal den Pfad an der falschen Stelle eingeben kann wird wohl ewig ein Rätsel bleiben ;/
Vielen Dank für die Hilfe btw
