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 8592539
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T23:46:27+00:00 2026-06-11T23:46:27+00:00

I encountered this problem, Usually you all are going to ask me the why,

  • 0

I encountered this problem, Usually you all are going to ask me the why, so I’ll explain first so you can just answer me, I’m working on a source with at least 500.000lines but now one of my source (.cpp) files I just created must NOT add the precompiled header which is “StdAfx.h” in this case, I must NOT edit the project precompiled header settings, obviously if I try to compile my the project without including stdafx in the new file i’ll be smashed with a C1010, what I’ve tried is this

StdAfx.h:

#ifndef __ABC123
//do all your includes
#endif

MyFile.cpp:

#define __ABC123
#include "StdAfx.h"
#undef __ABC123

Althought, this doesn’t works, stdafx.h is still including the files. Why I can’t have stdafx.h includes on this .cpp file is because some includes on stdafx have tons of conflicts with the includes of this cpp. I can’t modify the stdafx includes because thousands of other files use it, how to deal with this?

  • 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-06-11T23:46:28+00:00Added an answer on June 11, 2026 at 11:46 pm

    Impossible. You have painted yourself in to a corner here. Let me ‘splain.

    PCHs are intended to be used across an entire project. Every translation unit is expected to include the PCH.

    This behavior can be overridden, but only via the project settings for the translation unit in question. You have already said that you must not edit the project settings, hence eliminating your only avenue of escape.

    If you really need this and there’s no way out, I would consider taking such drastic steps as moving the non-PCH code in to its own project.

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

Sidebar

Related Questions

Pretty sure some people encountered this problem before. Followed all the instructions to setup
Making my first steps in RIA Services (VS2010Beta2) and i encountered this problem: created
While working on my final project for my AS/400 Course, I encountered this problem
I've encountered this problem a few times, and now I finally decided to ask,
I have never encountered this sort of problem in Java before. All this code
Somehow this is the first time I've ever encountered this problem in many years
I encountered this problem when doing some enthusiastic programming. The problem can be expressed
I've encountered this problem (while trying to add SQL Server Database (.mdf) file to
Hi i encountered this problem whereby when i initialized my String[], there seems to
I have encountered this problem today and I don't have an explanation for it.

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.