precompiled-headers

Precompiled headers with DLL solutions. Cannot open precompiled header file

百般思念 提交于 2019-12-03 12:30:57
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", project) but I'm getting the following error: Error 4 fatal error C1083: Cannot open precompiled header file: '....\Output\LudoSound\Debug\LudoSound.pch': No such file or directory ludosoundmanager.cpp 1 for each .cpp file. Why is this? How can I solve it? I

How to make GCC search for headers in a directory before the current source file's directory?

爱⌒轻易说出口 提交于 2019-12-03 10:12:10
问题 I am using GCC precompiled headers in my project with multi-architecture build, but things break down when I try to place it in a directory different from current source's directory. The file is included with double quotes, and it works if I change it to angle brackets, but the problem is that I have a lot of other projects that use the same precompiled header name, so changing all of them to angle brackets is not desirable as it may create ambiguity about which header to include in Visual

How to use precompiled headers efficiently (using /Yc and Yu options)?

和自甴很熟 提交于 2019-12-03 07:45:42
问题 We are using Visual Studio 2003 (VC71) for compilation. In order to reduce the compile time we changed the build script such that it generates the precompiled header (.pch) file for each CPP file. The option used in makefile: /Yc"StdAfx.h" /Fp"StdAfx.pch" With this the compile time for the target got reduced by 30%. But could anyone help me to understand how is it reducing the compiler time even when the pch file is getting generated every time for compilation of each CPP file. Also, is it

Visual C++ Precompiled Headers errors

给你一囗甜甜゛ 提交于 2019-12-03 06:09:05
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> #include <vector> #include <map> ... and my stdafx.cpp #include "stdafx.h" In every .h and .cpp file, I have the following: #pragma once //if in a header file #include "stdafx.h" For both release and debug, I have "Create Precompiled Header (/Yc)". It compiled fine in debug

Precompiled Headers? Do we really need them

北城余情 提交于 2019-12-03 05:53:47
Back a long time ago I used to use pre-compiled headers: a. to speed compilation and b. because I supported multiple development tools like CodeWarrior, MPW, VS, ProjectBuilder, gcc, intel compilers, etc, etc. Now I have a Mac Pro with 32gb of RAM. Now I use just CMake. So do we really need pre-compiled headers any more? Are there obvious benefits that I just dont see/know? How can one make a cross-platform pre-compiled header? Maybe that would simplify my life too. There is no such thing as a build that is "Fast enough". Proponents of TDD ( Test-Driven Development ) will be upset if their

GCC build time doesn't benefit much from precompiled headers

大城市里の小女人 提交于 2019-12-03 05:20:20
I have a huge project, something about 150 000 LOC of C++ code. Build time is something about 15 minutes. This project consists of many sub-projects of different sizes. I have built separate precompiled headers for each subproject, but when I use them build time stays roughly the same. It seemed that build time is 5-10% percent less, not more. Precompiled headers is definitely used, I use -Winvalid-pch option and I have tried to compile with -H compiler option, my precompiled headers appears in output with 'bang' symbol, that means that compiler is able to use precompiled header. All my

gcc precompiled headers weird behaviour with -c option

 ̄綄美尐妖づ 提交于 2019-12-03 04:53:13
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. First of all, I wrote a simple program(main.cpp) to test if they work at all: #include <boost/bind.hpp> #include <boost/function.hpp> #include <boost/type_traits.hpp> int main() { return 0; } Then I created the precompiled headers file pre.h(in the same directory

xCode 4.4 does not get all the .pch file headers imports?

烈酒焚心 提交于 2019-12-03 02:20:11
问题 This is my .pch file - // // Prefix header for all source files of the 'English Club' target in the 'English Club' project // #import <Availability.h> #ifndef __IPHONE_4_0 #warning "This project uses features only available in iOS SDK 4.0 and later." #endif #ifdef __OBJC__ #import <UIKit/UIKit.h> #import <Foundation/Foundation.h> #import <CoreData/CoreData.h> #import "Helper.h" #import "Animations.h" #import "Constants.h" #import "SoundPlayer.h" #import "UAirship.h" #import "UAStoreFront.h"

How to make GCC search for headers in a directory before the current source file's directory?

大兔子大兔子 提交于 2019-12-02 23:28:51
I am using GCC precompiled headers in my project with multi-architecture build, but things break down when I try to place it in a directory different from current source's directory. The file is included with double quotes, and it works if I change it to angle brackets, but the problem is that I have a lot of other projects that use the same precompiled header name, so changing all of them to angle brackets is not desirable as it may create ambiguity about which header to include in Visual Studio build of the same files. GCC searches current directory for double-quote includes before its

xCode 4.4 does not get all the .pch file headers imports?

女生的网名这么多〃 提交于 2019-12-02 15:51:17
This is my .pch file - // // Prefix header for all source files of the 'English Club' target in the 'English Club' project // #import <Availability.h> #ifndef __IPHONE_4_0 #warning "This project uses features only available in iOS SDK 4.0 and later." #endif #ifdef __OBJC__ #import <UIKit/UIKit.h> #import <Foundation/Foundation.h> #import <CoreData/CoreData.h> #import "Helper.h" #import "Animations.h" #import "Constants.h" #import "SoundPlayer.h" #import "UAirship.h" #import "UAStoreFront.h" #import "UIIMagesNames.h" #import "UIView+Sizes.h" #import "HelpButton.h" #import "SoundPlayer.h"