Questions tagged [precompiled-headers]

A precompiled header is a header file that has statically compiled but still separate from its final executable in order to speed up compilation of dependent files.

In C and C++, precompiled headers allow for quicker compilation times by keeping the definitions from a given header in an compiled state. This allows the compiler to quickly incorporate the header when a file dependent on the header is being compiled.

Rather than having to parse through code, precompiled headers allow the compiler to skip directly to a more intermediate state. For headers that are used frequently this can result in significant compile-time savings.

454 questions
0
votes
0 answers

PCH Files Error, with two targets

I have a project with multiple targets. For one target app is building fine. But for another target I am getting File not found for the frameworks added inside Pre-Compiled Header file. https://gyazo.com/63b1b25eabaff73eb48314dbd25e2b20 I've tried…
Naveen Nautiyal
  • 161
  • 1
  • 2
  • 9
0
votes
1 answer

iPhone Application build copies .pch.gch

I large (12 mb) Prefix.pch.gch file is being copied to my final iPhone application. It does not exist in the project and only shows up in the build log. It adds quite a bit to my otherwise small application size. Any suggestions for stopping xcode…
Sam Stewart
  • 1,470
  • 3
  • 14
  • 14
0
votes
1 answer

clang: error: no such file or directory: ...PrecompiledHeaders..../...pch

I have a project building correctly in one machine, but i am getting the following error when i try to build it in another. Both machines have the same version of OS X and XCode, and exactly the same source files. clang: error: no such file or…
Cristian
  • 26
  • 6
0
votes
1 answer

Separating Library Includes From Program Using Library

I am creating a DLL library which will export some functions to be used in other C++ projects. In my library, I am using precompiled headers, as well as Boost ASIO. However, I want to know if it is possible to contain all ASIO related things within…
John
  • 56
  • 9
0
votes
0 answers

stdafx.h being compiled over and over when pre-compiled headers enabled in visual studio

I have enabled pre-compiled headers in my VS solution, and correctly included stdafx.h in all code files. I am using the -Yc option in VS 2013. Here is where it gets weird. When I build, the compiler generates the pre-compiled headers for each .cpp…
0
votes
4 answers

Simple asp.net precompilation issue in IIS

Looks like I am struck with a simple issue. I am hosting a precompiled website. It compiles and works fine in my local box. But when I host in IIS it fails with following error. Could not load type 'MyHero.Home1'. <%@ Page Language="vb"…
user376250
  • 45
  • 8
0
votes
3 answers

Compile and link a header file with main() function using g++

I have a .hpp file that contains a main() function when a #define is present. This is for testing if you must know. As such, I need to produce an executable when I'm compiling with this testing enabled, but g++ seems to refuse and will only…
user62177541
  • 368
  • 3
  • 14
0
votes
2 answers

Are variables and functions defined in a library project's Pre-compiled header available to applications using the library?

If a library project defines some variables and utility functions in its stdafx.h/cpp, will these be visible throughout application projects built on top of the library?
Mr. Boy
  • 60,845
  • 93
  • 320
  • 589
0
votes
1 answer

Trying to build existing project, lots of "Cannot open include file: 'StdAfx.h': No such file or directory"

I've been handed the source code for a very large c++ project and asked to make a small change to support some new hardware. I'm not very familiar with c++, as I mostly use C# these days. When I built the project I'm getting 20+ Error 2 error…
Joe
  • 6,773
  • 2
  • 47
  • 81
0
votes
0 answers

Include guards in system headers and effect on compile speed

I'm currently speeding up compilation of a large C++ project (there is some C code too). Initially I'm removing unnecessary system includes; and introducing precompiled headers for common system includes such as stddef.h or vector. But not for…
TooTone
  • 7,129
  • 5
  • 34
  • 60
0
votes
0 answers

.Net: Open .compiled file which is code behind the view page

compiled file in bin folder which is code behind page in my project. I don't have source code. so I need to open my .compiled file to see code and If possible I need to change it. How to open it to see code in it. used Refactor tool which gives…
Prasad Phule
  • 468
  • 4
  • 20
0
votes
0 answers

Odeint with precompiled headers in Mingw fails

I can't compile my project when I include in a precompiled header and compile using Mingw4.9.2-32bit (from Qt 5.4). The precompiled file is about 200 MB (huge!). The error message I get from the…
spacemig
  • 82
  • 8
0
votes
3 answers

CocoaLumberjack's Log Level switches to verbose

I'm using the CocoaLumberjack logging framework 2.0.0 for logging with different levels. In my Prefix.pch (I know that this file is deprecated, but it should work nevertheless) I include Cocoalumberjack and set the global log level as suggested…
0
votes
0 answers

How to set multiple precompiled header in CMake

I attempt to resolve a problem with my precompiled header. Normally, with /Yu and /Yc, all is working well. But in the case I have a different path for #include in same project, I can't find a solution. The tree directory is like that…
Algorys
  • 1,710
  • 2
  • 25
  • 52
0
votes
1 answer

Altering "Build Settings" to include a prefix header in Xcode 6.1

I'm presently taking an iOS development course and I'm working with Objective-C for this portion of the course. My current lesson involves altering a Prefix header, which wasn't created when I started this project. I created one manually following…
Adrian
  • 16,233
  • 18
  • 112
  • 180