Hello All,
If I define something in a pre-compiled header like:
#define __BUILD_MAC__
and then in a header file do:
#ifdef __BUILD_MAC__
typedef void* HINSTANCE;
#endif
This should work. But for some reason It isn't. I know because when I compile I get errors about HINSTANCE not naming a type.
Do I need to do anything else...
Hi All,
in a pre-compiled header if I do:
#define DS_BUILD
#define PGE_BUILD
#define DEMO
then in source I do:
#if (DS_BUILD && DEMO)
---- code---
#elif (PGE_BUILD && DEMO)
--- code---
#else
--- code ---
#endif
Do I get an error that states: error: operator '&&' has no right operand
I have never seen this before. I am...
Hi, experts,
I tried to reuse the .pch to speed the build using the following way:
use /Yc on stdafx.cpp to create the .pch files to a folder
exclude stdafx.cpp in the project, and modify the link option
It success in my machine, but failed in another, got the error message: error C2011: '*' : 'struct' type redefinition
So first I ...
Hello,
I'm using precompiled headers on a Qt project to speed up compilation time. I'm using Qt 4.6.2 .When I compile the project using macx-g++ (meaning the g++ compiler) it doesn't include the stdafx.h automatically for each header. When compiling under xcode it will work. I'm using the PRECOMPILED_HEADER qmake constant to point at m...
I'm trying to build an Xcode project with GNUStep-make. Right now the project is very small (3 classes) however it will grow to hundreds of classes over the coming weeks so I'm trying to get everything figured out and well-organised now.
Xcode creates a ProjectName_Prefix.pch file which is a header that: a) get precompiled and b) is pr...
I read some of the questions about precompiled headers but couldn't find a direct answer to that.
I usually rebuild my entire Visual Studio 2010 solution.
One of the projects in my solution is a C++/CLI project.
I thought that using precompiled headers in that project will increase the speed of the compilation.
After some experiments...
Unfortunately on a project here at work, someone had the great idea to put every header every single file from pretty big project into the precompiled header. This means any change to any header in the project has to recompile the entire project, and all cpp files taking way too long.
Is there any decent C++ refactoring tool which coul...
I want to use a precompiled library in my project.
I have 3 folders: Include (.h files), Lib (with .lib files) and Bin (with .dll files and .pdb files). I've never used precompiled libraries before (I hope this is the right term. correct me if I'm wrong). I want to use this API. How to add all this stuff to my project?
I use visual stud...
Hello!
I am right now reorganizing my project and what recently was a simple application now became a pair of C++ projects - static library and real application.
I would like to share one precompiled header between two projects, but face some troubles with setting up the .pdb file paths.
Assume my first project is called Library and b...
I am trying to upgrade an old solution to use VS2010 (VC100).
I have it setup so that stdafx.cpp will create a precompiled header stdafx.pch from stdafx.h. Then all the other .cpp files that include stdafx.h are instructed to use the precompiled header.
These posts helped me get this far:
Visual C++ Precompiled Headers errors
Precomp...
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 th...
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" AutoEventWireup="false" CodeBehind="Home.aspx.vb" Inherits="MyHero.Home1" %>
I can find MyHero.dll...
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 from copying it? Does anyone know what it is? I did a little research, and it looks like a ...
XCode compiles all source every time i build project and it takes a lot of time. Looks like precompiled headers don't work. It worked correct before i changed location of project. What shuold i do to make it work?
UPD: it's fixed few minutes ago. I don't know how.
UPD2: It's starts again! XCode compiles all sources every time i build. ...
I'm new to xcode and I must be missing something.
Create a new command-line project. Call it tempprog (for instance).
Select Project/Edit Project Settings.
Edit the name of the prefix header (tempprog_Prefixz.pch).
Build - it will fail, of course, looking for tempprog_Prefixz.pch
Now change the name of the prefix header back to temppro...
Not sure if this is a duplicate, please link to similar question if it is.
I have a precompiled header stdafx.h which is used in all source files in my project. Thus all headers in the stdafx.h are available in all code files in the project.
What I'm unsure about is whether or not to re-include stuff thats alrdy in the precompiled head...
Sometimes I need to perform a rebuild of my project but I don't want the pre-compiled headers to be recompiled every time I do that - sort of defeats the purpose, at least in this case. Is there any way to get Visual Studio to rebuild without recompiling the PCH and compile the PCH as needed (if the rarely changed headers change)
...
I just created a "C++ Standard Dynamic" library project using Xcode and compiled using LLVM 2.0. I notice that the PCH file contains the line #include <iostream> but the file Test.cp also includes that #include <iostream> statement.
The strange thing is that by removing the statement in Test.cp, the build fails with the error Semantic ...