Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Managed C++/CLI
  4. Stdafx.h and the C1010 and C1034 errors

Stdafx.h and the C1010 and C1034 errors

Scheduled Pinned Locked Moved Managed C++/CLI
c++csharpquestionvisual-studiohelp
1 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • N Offline
    N Offline
    NietzscheDisciple
    wrote on last edited by
    #1

    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
    #include

    using 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!

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups