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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T11:48:31+00:00 2026-05-25T11:48:31+00:00

I have a header in my project, called Core.h, that I use as a

  • 0

I have a header in my project, called Core.h, that I use as a pre-compiled header:

$(CXX) $(CXX_CFLAGS) -x c++-header Core.h

Which creates a file named Core.h.gch

*#include "Core.h" is the first directive of every source file in the module.

On OS X, it works fine — my project compiles fine & it compiles pretty fast.

On Linux however, 7 of my 100+ files give the following warning:

warning: Core.h.gch: too short to be a PCH file

Just like every other source file, #include "Core.h" is the first line of these files.

Has anyone ever come across this? Possible causes? Why would it only be a few files that include the PCH that would give the warning ?

I use gcc version 4.1.2 on Linux, 4.2.1 on OSX

Thanks!

EDIT:

Here is basically how I build the library:

.PHONY: all 
all: $(MY_PCH) MYLIB.so MYLIB.a

MYLIB.so: $(MY_PCH) $(MY_OBJECTS)
  $(CXX) $(MY_OBJECTS) $(CXX_LDFLAGS) -o $@

MYLIB.a: $(MY_PCH) $(MY_OBJECTS)
  $(AR) $(ARFLAGS) $@ $(MY_OBJECTS)

$(MY_PCH):
  $(CXX) $(CXX_CFLAGS) -x c++-header Core.h
  • 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-25T11:48:32+00:00Added an answer on May 25, 2026 at 11:48 am

    Are you using a parallel make? Possibly g++ is trying to read the .gch file while another instance is writing to it.

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

Sidebar

Related Questions

I have C++ project (VS2005) which includes header file with version number in #define
Let's say I have a header file called inclusions.h that has all the #include
I have a project that includes 49 folders, each one has a file called
I have a header file, lets say Common.h, that is included in all of
I am facing a weird problem. I have got a file called in which
If you have a project that utilizes a makefile which compiles multiple files and
On my Android project I have the main Activity called TestFIO , which is
I have a header file like this: #ifndef __GEN_NOTE_MARKERS_TO_DEVELOPERS_HPP__ #define __GEN_NOTE_MARKERS_TO_DEVELOPERS_HPP__ #ifdef _DEBUG //
I have a header.html which start with session_start();. Then the following code, $_SESSION['cart'][$sw_id] is
Disclaimer: I'm working in a project where exist an huge webapp that have an

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.