Stdafx.h and the C1010 and C1034 errors
-
I'm attempting to write a managed wrapper interface to a native C++ class such that I can access it from within my C# code. I'm using Visual Studio .NET 2003 on Windows 2000. I started a new solution: Visual C++ Projects > Class Library (.NET) My Stdafx.h file has the following in it:
#pragma once
#define WIN32_LEAN_AND_MEAN
// Windows Header Files:
#include
#includeusing std::cout; using std::endl;
In the Solution Explorer, under Source Files I have the following: 1. AssemblyInfo.cpp 2. BiquadCode.cpp (native C++ code) 3. DSPWrap.cpp (the wrapper code) 4. Stdafx.cpp Under Header Files, I have: 1. BiquadCode.h 2. DSPWrap.h 3. resource.h 4. Stdafx.h I've "included" the Stdafx.h file in the first statement of DSPWrap.cpp. On a build attempt, the code generated a C1010 error. For the files BiquadCode.cpp and BiquadCode.h, I've now set the precompiled header option as "Not using precompiled headers". However, this throws a C1034 error \DSPWrap\DSPWrap\Stdafx.h(9): fatal error C1034: windows.h: no include path set My questions are as follows: 1. How do I get this code to compile? 2. Where exactly do I need to "include" the Stdafx.h file? Do I need to do it only once in the wrapper code file? Thanks in advance!