Search Results

Search found 159 results on 7 pages for 'precompiled'.

Page 1/7 | 1 2 3 4 5 6 7  | Next Page >

  • Precompiled headers question

    - by Kotti
    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 builds it's .lib file with a corresponding Library.pdb file. Now, the second project is called Application and builds everything into the same folder (.exe and another Application.pdb file). Right now my both projects create their own precompiled headers file (Library.pch and Application.pch) based on one actual header file. It works, but I think it's a waste of time and I also think there should be a way to share one precompiled header between two projects. If in my Application project I try to set the Use Precompiled Header (/Yu) option and set it to Library.pch, it wouldn't work, because of the following error: error C2858: command-line option 'program database name "Application.pdb" inconsistent with precompiled header, which used "Library.pdb". So, does anyone know some trick or way to share one precompiled header between two projects preserving proper debug information?

    Read the article

  • Do Precompiled headers help with rebuilds?

    - by brickner
    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, it seems that using precompiled headers only slows the rebuild process. Do precompiled headers only help with builds that didn't completely clean the old files?

    Read the article

  • gcc precompiled headers weird behaviour with -c option

    - by pachanga
    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) as follows: #include <boost/bind.hpp> #include <boost/function.hpp> #include <boost/type_traits.hpp> ...and compiled it: $ g++ -I. pre.h (pre.h.gch was created) After that I measured compile time with and without precompiled headers: with pch $ time g++ -I. -include pre.h main.cpp real 0m0.128s user 0m0.088s sys 0m0.048s without pch $ time g++ -I. main.cpp real 0m0.838s user 0m0.784s sys 0m0.056s So far so good! Almost 7 times faster, that's impressive! Now let's try something more realistic. All my sources are built with -c option and for some reason I can't make pch play nicely with it. You can reproduce this with the following steps below... I created the test module foo.cpp as follows: #include <boost/bind.hpp> #include <boost/function.hpp> #include <boost/type_traits.hpp> int whatever() { return 0; } Here are the timings of my attempts to build the module foo.cpp with and without pch: with pch $ time g++ -I. -include pre.h -c foo.cpp real 0m0.357s user 0m0.348s sys 0m0.012s without pch $ time g++ -I. -c foo.cpp real 0m0.330s user 0m0.292s sys 0m0.044s That's quite strange, looks like there is no speed up at all!(I ran timings for several times). It turned out precompiled headers were not used at all in this case, I checked it with -H option(output of "g++ -I. -include pre.h -c foo.cpp -H" didn't list pre.h.gch at all). What am I doing wrong?

    Read the article

  • missing .cs files in precompiled website with c# in asp.net

    - by Greg
    Hi, I need to change the code of some asp.net application but the application is missing its .cs files, there are only .aspx files. As I read in google, I understand that the application is a precompiled website. I am not too familiar with it so the question is, can I somehow retrieve the code-behind .cs files of this application because I need to change some functions there. Surely there is a way I can access them or retrieve them somehow? Thanks in advance, Greg

    Read the article

  • Precompiled headers with GCC

    - by Lee Baldwin
    Anyone had any success getting precompiled headers working with GCC? I have had no luck in my attempts and I haven't seen many good examples for how to set it up. I've tried on cygwin gcc 3.4.4 and using 4.0 on Ubuntu.

    Read the article

  • error C2512 in precompiled header file?

    - by SoloMael
    I'm having a ridiculously strange problem. When I try to run the program below, there's an error message that says: "error C2512: 'Record' : no appropriate default constructor available". And when I double-click it, it directs me to a precompiled read-only header file named "xmemory0". Do they expect me to change a read-only file? Here's the segment of code in the file it directs me to: void construct(_Ty *_Ptr) { // default construct object at _Ptr ::new ((void *)_Ptr) _Ty(); // directs me to this line } Here's the program: #include <iostream> #include <vector> #include <string> using namespace std; const int NG = 4; // number of scores struct Record { string name; // student name int scores[NG]; double average; // Calculate the average // when the scores are known Record(int s[], double a) { double sum = 0; for(int count = 0; count != NG; count++) { scores[count] = s[count]; sum += scores[count]; } average = a; average = sum / NG; } }; int main() { // Names of the class string names[] = {"Amy Adams", "Bob Barr", "Carla Carr", "Dan Dobbs", "Elena Evans"}; // exam scores according to each student int exams[][NG]= { {98, 87, 93, 88}, {78, 86, 82, 91}, {66, 71, 85, 94}, {72, 63, 77, 69}, {91, 83, 76, 60}}; vector<Record> records(5); return 0; }

    Read the article

  • precompiled header .pch files are machine sensitive?

    - by fresky
    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 want to ask whether the .pch files are machine sensitive? then secondly, the above approaches workable? Thanks!

    Read the article

  • Running a custom VirtualPathProvider with a PreCompiled website

    - by epilog
    Hi, currently I have a custom VirtualPathProvider in a Asp.net MVC web application. This VirtualPathProvider checks the Area from the route "/{Area}/{Controller}/..." and uses the NameSpace.{Area}.Main.dll module to return the views that are contained in that assembly as Embedded Resources. This works great and I don't have to deploy any ascx, js, css files. Now my problem is this: I would like to precompile the aspx and ascx files in the assembly and instead of having the views as embedded resources I would have the view class with all the Response.Write and dings and dongs. I can precompile the views using the aspnet_compiler but I keep getting an error when ever the ViewEngine tries to find the view and fails. My main goal is to have a way for the first time usage of a certain view/usercontrol would be faster and don't wait for the compilation to happen. This is a requirement since the application could be grouped into plugins and this plugins be deployed into the Bin directory. Any thoughts? With best regards Carlos Sobrinho

    Read the article

  • GNUStep make with a precompiled (and prefixed) .pch header from Xcode project?

    - by d11wtq
    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 prefixed to every file in my project; at least if I understand correctly. Now, how do I tell GNUStep-make what to do with this file when it builds? I've added it to the XXX_PRECOMPILED_HEADERS variable. Cioccolata_OBJC_PRECOMPILED_HEADERS = Cioccolata_Prefix.pch With this in place the build fails with the error: Making all for framework Cioccolata... make[1]: *** No rule to make target `/Users/chris/Projects/Mac/Cioccolata/build/GNUStep/obj/PrecompiledHeaders/ObjC/Cioccolata_Prefix.pch', needed by `internal-precompile-headers'. Stop. make: *** [Cioccolata.all.framework.variables] Error 2 I've also got the following in my makefile: ADDITIONAL_OBJC_FLAGS += -include Cioccolata_Prefix.pch -Winvalid-pch I'm not sure what I've done wrong here. I basically have tried to follow the GNUStep documentation for precompiled headers. None of my project's source files expressly include the Foundation framework since this header does that.

    Read the article

  • skipped when looking for precompiled header

    - by numerical25
    So some reason, my .cpp file is missing it's header file. But I am not including the header file anywhere else. I just started so I checked all the files I made enginuity.h #ifndef _ENGINE_ #define _ENGINE_ class Enginuity { public: void InitWindow(); }; enginuity.cpp #include "Enginuity.h" void Enginuity::InitWindow() { } main.cpp #include "stdafx.h" #include "GameProject1.h" #define MAX_LOADSTRING 100 // Global Variables: HINSTANCE hInst; // current instance TCHAR szTitle[MAX_LOADSTRING]; // The title bar text TCHAR szWindowClass[MAX_LOADSTRING]; // the main window class name // Forward declarations of functions included in this code module: ATOM MyRegisterClass(HINSTANCE hInstance); BOOL InitInstance(HINSTANCE, int); LRESULT CALLBACK WndProc(HWND, UINT, WPARAM, LPARAM); INT_PTR CALLBACK About(HWND, UINT, WPARAM, LPARAM); int APIENTRY _tWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPTSTR lpCmdLine, int nCmdShow) { code..... #endif dont know what's going on. The error I get is 1>c:\users\numerical25\desktop\intro todirectx\gameproject\gameproject1\gameproject1\enginuity.cpp(1) : warning C4627: '#include "Enginuity.h"': skipped when looking for precompiled header use 1> Add directive to 'stdafx.h' or rebuild precompiled header 1>c:\users\numerical25\desktop\intro todirectx\gameproject\gameproject1\gameproject1\enginuity.cpp(8) : fatal error C1010: unexpected end of file while looking for precompiled header. Did you forget to add '#include "stdafx.h"' to your source?

    Read the article

  • MSBuild Override Project Reference to resolve to Precompiled Assembly

    - by Ryu
    Situation I have about 400 csproj files using project references. About 3 of those a separate team wants to fork and incorporate into a standalone app. I branched the 3 projects of interest, and because the separate team uses a diff SVN repo I used svn externals to pull in these projects into the folder of the standalone app. Obviously since this team uses a different folder structure the project references no longer resolve. Attempted Solution I figured setting the msbuild properties ReferencePath and AdditionalLibPaths to point to a directory with all the precompiled dependencies would allow the project references a fallback point and resolve correctly. However that doesn't appear to be the case. Question Does anybody know a way to have a failed projectreference look up resolve to the precompiled dll? Perhaps point me to an automated tool to convert projectreferences to dll references? Or is there a better way to solve this problem? Thanks

    Read the article

  • MinGW-gcc PCH not speeding up wxWidget build times. Is my setup correct?

    - by Victor T.
    Hi all, I've been building wxMSW 2.8.11 with the latest stable release of mingw-gcc 4.5.1 and I'm trying to see if the build could be sped up using precompiled headers. My initial attempts at this doesn't seem to work. I basically followed the given instructions here. I created a wxprec.h precompiled header with the following: g++ -O2 -mthreads -DHAVE_W32API_H -D__WXMSW__ -DNDEBUG -D_UNICODE -I..\..\lib\gcc_dll\mswu -I..\..\include -W -Wall -DWXBUILDING -I..\.. \src\tiff -I..\..\src\jpeg -I..\..\src\png -I..\..\src\zlib -I..\..\src \regex -I..\..\src\expat\lib -DwxUSE_BASE=1 -DWXMAKINGDLL -Wno-ctor- dtor-privacy ../../include/wx/wxprec.h That does successfully create a wxprec.h.gch that's about ~1.6meg in size. Now I proceed to build wxmsw using the follow make command from cmd.exe shell: mingw32-make -f makefile.gcc While, the build does succeed I noticed no speedup whatsoever then if pch wasn't used. To make sure gcc was actually using the pch I added -H in the config.gcc and did another rebuild. Indeed, the outputted include list does show a '!' next to the wxprec.h so gcc is supposely using it. What's the reason for pch not working? Did I setup the precompiled headers correctly or am I missing a step? Just for reference comparison, here's the compile times I get when building wxmsw 2.8.11 with the other compilers(visual studio 2010 and C++ Builder 2007). The time savings is pretty significant. | | release, pch | release, nopch | debug, nopch ------------------------------------------------------- | gcc451 | 8min 33sec | 8min 17sec | 8min 49sec | msc_1600 | 2min 23sec | 13min 11sec | -- | bcc593 | 0min 59sec | 2min 29sec | -- Thanks

    Read the article

  • Can you precompile and merge part of an ASP.NET website and then continue development?

    - by michielvoo
    A big part of the web site is precompiled and merged, since it's almost never going to change. The precompiled bits can be replaced in case of updates to the original. I want to continue development of new pages, but when I browse to a new page I get the following error: The file '/Website/Test/Default.aspx' has not been pre-compiled, and cannot be requested. Is there any way around this? Edit: If I remove the precompileApp.config file I get the contents of the marker files when I browse them: This is a marker file generated by the precompilation tool, and should not be deleted!

    Read the article

  • using #define in a .pch

    - by ML
    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 to make these defines available?

    Read the article

  • Pre-Compiled Header Design Question

    - by ML
    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 would clean up the classes/headers a bit too? What are do's and don't with pre-compiled headers?

    Read the article

  • Structs inside #define in C++

    - by Adam Smith
    Being pretty new to C++, I don't quite understand some instructions I encounter such as: #ifndef BOT_H_ #define BOT_H_ #include "State.h" /* This struct represents your bot in the game of Ants */ struct Bot { State state; Bot(); void playGame(); //plays a single game of Ants void makeMoves(); //makes moves for a single turn void endTurn(); //indicates to the engine that it has made its moves }; #endif //BOT_H_ What I don't understand is the "#ifndef BOT_H_" and the "#define -- #endif" From what I gather, it defines a constant BOT_H_ if it's not already defined when the precompiler looks at it. I don't actually get how the struct inside it is a constant and how it is going to let me access the functions inside it. I also don't see why we're doing it this way? I used C++ a while back and I wasn't using .h files, so it might be something easy I'm missing.

    Read the article

  • #define and how to use them - C++

    - by ML
    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 using XCode 3.2, GCC 4.2 on OS X 10.6.3

    Read the article

  • LinqtoSql Pre-compile Query problem with Count() on a group by

    - by Joe Pitz
    Have a LinqtoSql query that I now want to precompile. var unorderedc = from insp in sq.Inspections where insp.TestTimeStamp > dStartTime && insp.TestTimeStamp < dEndTime && insp.Model == "EP" && insp.TestResults != "P" group insp by new { insp.TestResults, insp.FailStep } into grp select new { FailedCount = (grp.Key.TestResults == "F" ? grp.Count() : 0), CancelCount = (grp.Key.TestResults == "C" ? grp.Count() : 0), grp.Key.TestResults, grp.Key.FailStep, PercentFailed = Convert.ToDecimal(1.0 * grp.Count() / tcount * 100) }; I have created this delegate: public static readonly Funct<SQLDataDataContext, int, string, string, DateTime, DateTime, IQueryable<CalcFailedTestResult>> GetInspData = CompiledQuery.Compile((SQLDataDataContext sq, int tcount, string strModel, string strTest, DateTime dStartTime, DateTime dEndTime, IQueryable<CalcFailedTestResult> CalcFailed) => from insp in sq.Inspections where insp.TestTimeStamp > dStartTime && insp.TestTimeStamp < dEndTime && insp.Model == strModel && insp.TestResults != strTest group insp by new { insp.TestResults, insp.FailStep } into grp select new { FailedCount = (grp.Key.TestResults == "F" ? grp.Count() : 0), CancelCount = (grp.Key.TestResults == "C" ? grp.Count() : 0), grp.Key.TestResults, grp.Key.FailStep, PercentFailed = Convert.ToDecimal(1.0 * grp.Count() / tcount * 100) }); The syntax error is on the CompileQuery.Compile() statement It appears to be related to the use of the select new {} syntax. In other pre-compiled queries I have written I have had to just use the select projection by it self. In this case I need to perform the grp.count() and the immediate if logic. I have searched SO and other references but cannot find the answer.

    Read the article

  • Where can I get precompiled mod_perl, mod_python for Apache on Win64?

    - by Soumya92
    I have managed to set up pure 64-bit Apache, PHP, MySQL, and 64-bit distributions of Perl and Pyton. However, I cannot get Apache to automatically parse .pl files with Perl, and .py files with Python. Looking around points to mod_perl and mod_python for Apache, which unfortunately fail to build. Is there any precompiled mod_perl, mod_python for Win64? Or is there any other way of getting .pl, .py to work on Apache?

    Read the article

  • when is java faster than c++ (or when is JIT faster then precompiled)?

    - by kostja
    I have heard that under certain circumstances, Java programs or rather parts of java programs are able to be executed faster than the "same" code in C++ (or other precompiled code) due to JIT optimizations. This is due to the compiler being able to determine the scope of some variables, avoid some conditionals and pull similar tricks at runtime. Could you give an (or better - some) example, where this applies? And maybe outline the exact conditions under which the compiler is able to optimize the bytecode beyond what is possible with precompiled code? NOTE : This question is not about comparing Java to C++. Its about the possibilities of JIT compiling. Please no flaming. I am also not aware of any duplicates. Please point them out if you are.

    Read the article

  • Problem with include guard

    - by isurulucky
    When I add an include guard to my header file for a Visual C++ project, it gives me the following warning and error: warning C4603: '_MAPTEST_H' : macro is not defined or definition is different after precompiled header use Add macro to precompiled header instead of defining here .\MapTest.cpp(6) : use of precompiled header** // the precompiled header stdafx.h is included in this line .\MapTest.cpp(186) : fatal error C1020: unexpected #endif but when I add the precompiled header before the include guard, no warning or error is emitted. What is the reason for this?

    Read the article

  • Is it safe to delete the "ipch" folder - Precompiled headers?

    - by Jamie Keeling
    Hello, I was looking through the folder for an application I am working on and noticed the "ipch" folder, for my solution which has two small projects it weighs in at about 90mb+ in size. I have found an article discussing the use for the files and was wondering if they were safe to delete? It's for an assignment hand in and I would like to keep the electronic hand in as small as possible. If I were to delete the folder will the application remain in a safe and stable state? I apologise if this is a simple question, I have only just started using Visual Studio 2010. Thanks! Pre-Compiled Headers

    Read the article

1 2 3 4 5 6 7  | Next Page >