Is it possible to use gcc precompiled headers in projects using automake / libtool?
Adding new make rules to build precompiled headers is not difficult. The issue is that you also have to add compilation flags introduced by libtool and AFAIK it can't handle header input files.
How can you do that?
...
Update:
What are the effects of including stdafx.h in my header files?
I started on a C++ project in Linux/Eclipse CDT and imported it into Visual C++/Windows.
In Visual C++, I started using precompiled headers to speed up compilation and defined stdafx.cpp and stdafx.h.
Here's my stdafx.h
#pragma once
#include <string>
#includ...
So, I'm making a program to test the efficiency of certain data structures. I have all the .h files and I made a very terrible makefile that probably is wrong, although it seems to work up to a point. Instead of making .o files it makes .gch files, so when it tries to acces all the .o files they are not found. This is my makefile
pro...
I understand the purpose and reasoning behind precompiled headers. However, what are the rules when implementing them? From my understanding, it goes something like this:
Set your project up to use precompiled headers with the YU directive.
Create your stdafx.h file and set that to be your precompiled header.
Include this as the top ...
So,
I have to use precompiled headers in my VS 2005 project. Now I have a shared source file that does not have a #include "stdafx.h"... How can I include the shared source file in my project without adding stdafx.h to the top of the source file and without turning off precompiled headers??
...
Say I have a single project, with files A.cpp, B.cpp, C.ppp and matching header files (and that's it). The C++ files include system headers or headers from other modules.
I want to compile them to a library with command line actions (e.g., using Make), using 'cl', with the precompiled headers feature.
What are the steps I should do? Wh...
This worked without error when this solution worked off of .lib files instead of .dll files.
I have all of my projects except one currently using a precompiled header, without error. The precompiled header is called "LudoGlobal.h". I am trying to link the last project to this precompiled header (which exists in a seperate, "Core", p...
Error 1 fatal error C1083: Cannot open
source file:
'FpDebug/BalanceGrabber.pch': No such
file or directory c1xx
...
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 hea...
I have been through every option to try to find a way to get the IDE to let me create a new win32pject without precompiled headers. I have read every thread on this forum with the words "precpmpiled headers" in it and the closest I got was:
http://stackoverflow.com/questions/1293538/precompiled-headers
Using 2008 pro (not express, alth...
The VS-IDE will write //{{NO_DEPENDENCIES}} to resource header files.
This comment is actually a feature that prevents (unnecessary) rebuilding of cpp files that include the resource header.
But, like stated in the MSDN, this can lead to "undesirable side-effects".
In our project we do have the resource.h included in the stdafx.h for p...
OK, I have old Metrowerks code for Mac and Windows where the previous developer used pre-compiled headers for every project that this code base builds.
How does one get rid of Pre-compiled headers, conceptually?
do you take the contents of a .pch and move them to a core.h and include that in all of your classes .h files?
I want to mo...
In my project several STL headers are used in different files. I read that, putting all these headers into a single header and using that header in my files will allow compilers to precompile the header which may lead into faster compile time.
If I understood it correctly, I need to write like the following.
// stl.hpp
#include <strin...
We are using precompiled headers with GCC for our project and build them like this:
gcc $(CFLAGS) precompiledcommonlib.h
Now I'm building the project on OSX 10.6 and trying to use the nifty feature of building for all architectures at the same time like this:
gcc $(CFLAGS) -c -arch i386 -arch x86_64 commonlib.c
However, it seems th...
How would it be possible to configure VC++/Solution/Projects to rebuild all but the precompiled headers?
...
Is there anything equivalent to #pragma once for Codegear RAD Studio 2009?
I am using the precompiled header wizard and I would like to know if it is still necessary to use include guards when including header files?
...
I.e. we use stdafxmanaged.h for all managed source files and stdafx.h for normale Win32 files. The reason I ask is that we have done this with success in VS.NET 2008, but when we upgraded to VS.NET 2010, the compiler always want to delete the PCH files and recompile everything all the time.
...
I have some useful typedefs on a header file called utypes.h. I have decided to use make and haven't found a way to compile it since then.
When I execute gcc -Wall -c utypes.h to generate the .o object of utypes I get the following error:
"utypes.h:1 fatal error: can't create precomiled header types.h.gch: Permission Denied (EACESS)
C...
Hi All,
I have code that uses a pre-compiled header. (previously done by someone else)
In it, they are including several .h files.
If I have classes that use common .h files that are not currently in the existing pre-compiled header, would tossing them in there be of any real benefit? Maybe compilation speed, but I was thinking it wou...
Short story:
I can't make precompiled headers work properly with gcc -c option.
Long story:
Folks, I'm using gcc-4.4.1 on Linux and before trying precompiled headers in a really large project I decided to test them on simple program. They "kinda work" but I'm not happy with results and I'm sure there is something wrong about my setup....