Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 415015
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T18:20:22+00:00 2026-05-12T18:20:22+00:00

We do have a project wich uses the MIDL tool to create specific header/iid

  • 0

We do have a project wich uses the MIDL tool to create specific header/iid and proxy files. Those files are compiled and linked with the rest of the project using a post build step that calls nmake.

Is it possible to use precompiled headers with thos IDL generated files? How can I inject #include "stdafx-h" and remove other included headers?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-12T18:20:22+00:00Added an answer on May 12, 2026 at 6:20 pm

    Use the /FI option (Force Include): “This option has the same effect as specifying the file with double quotation marks in an #include directive on the first line of every source file specified on the command line, in the CL environment variable, or in a command file.”

    It won’t remove the other headers, but this is not necessary for the Precompiled Header to be used… All the headers that you want to precompile should be included by stdafx.h. Then, provided the files have inclusion guards, it won’t be a problem when they are included again in the sources.

    Example

    Generated a.cpp file:

    #include <a.h>
    #include <b.h>
    //rest of the code
    

    Suppose you want to pre-compile a.h and b.h. Then you create the file stdafx.h:

    #include <a.h>
    #include <b.h>
    

    And then you use the /FI option to have this stdafx.h included as the first file into a.cpp. If the files a.h and b.h have include guards, leaving them in a.cpp is not an issue…

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have project, this contains header files like. #import Three20/TTButton.h #import Three20/TTStyle.h #import Three20/TTStyleSheet.h
I have C++ project (VS2005) which includes header file with version number in #define
I have project written in C#. I create install project for this project, and
I'm working in a project with several classes. All header files are into include
In my ZF project I have a model, wich has to address a large
We have a project with some special requirements, one of wich is getting data
I am dealing with a project, in wich I have written one Exception for
I have project that I'm working on that is going to require a webserver.
I have project Emle in Launchpad . I set it to import from emle.svn.sourceforge.net
I have a project that I'm currently working on but it currently only supports

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.