Professional UI Solutions
Site Map   /  Register
 
 

Forum

Please Log In to post a new message or reply to an existing one. If you are not registered, please register.

NOTE: Some forums may be read-only if you are not currently subscribed to our technical support services.

Forums » Prof-UIS Tech Support » Huge comilation time Collapse All
Subject Author Date
Nitesh Singh Nov 27, 2006 - 3:19 AM

Hi support.........

I want to mention that my solution is having a total of 10 projects. And I am using the prof-UIS classes in 2 projects.. that too only 30 files. But as u have directed that we should include #include <Prof-UIS.h> in stdafx.h...... I have included the file in stdafx.h....

now my project takes huge amount of compilation time just because of that (More that double of the earlier...)

Will it not work if I don’t include prof-uis.h in stdafx.h..... and only include where prof-uis classes are used....

Nitesh Singh Nov 27, 2006 - 4:56 AM

sorry 4 de typing mistake

Technical Support Nov 27, 2006 - 12:45 PM

You should include the Prof-UIS.h file only once in each project. The best place is the StdAfx.h file. Please also make sure that the precompiled headers are used in your projects. This should greatly decrease the compilation time.

Nitesh Singh Nov 30, 2006 - 2:15 AM

I have 1 main project
three DLL project and rest of them as static lib project.................

Now I use classes of Prof-UIS only in 3 projects.....

1. 4 files of 1st Project
2. In 3 header file and about 30 cpp files of the 2nd Project
3. In 1 header file and 1 cpp file of the third project.....

so I have added #include <Prof-UIS.h> in the stdafx.h of those three projects.
..................................................................................................

In one project(some other project) I use the classes declared in these header files.........
Now when I compile the solution. Many cpp files when they get complied displays the message

Prof-UIS multiple monitor support:
built-in
Automatically linking with Prof-UIS library: ProfUIS261md.lib
(Professional User Interface Suite)

And takes much longer time to compile.

I want this to be displayed as minimum as possible..... And since I am not using prof-uis classes in most of the cpp files of the project (1st, 2nd and 3rd).... then why do I need to add in stdafx.h

Is is not better to have #include <Prof-UIS.h> in invidual files... or instead of declaring whole prof-uis.h can’t I include the specific files like
CExtGrdWnd.h where I am using only this file’s classes....

Please suggest.. Because It is greatly decreasing the performance.. thank you...

Technical Support Nov 30, 2006 - 1:00 PM

The best way to include Prof-UIS is to do this in StdAfx.h. Please make sure that all the .cpp files are using precompiled headers and the StdAfx.cpp file generates a precompiled header database. If this is not configured correctly, the Prof-UIS.h file will be included the same number of times as the StdAfx.h file and the files in your project will be compiled slowly. You can easily check if the precompiled headers are used: "Automatically linking ..." should appear only once. Otherwise, it will appear each time a source file is compiled.

Offer Har Nov 30, 2006 - 6:19 AM

Use pre-compile headers - this will decrease the compile time but a lot.
I had the same problem, and it is solved by pre-compiled headers.

Nitesh Singh Dec 1, 2006 - 2:05 AM

thanks Offer.................... But when I am changing my project settings (for precompiled headers) from "Automatically generate" to "Pre-complied headers" then it is giving me compilation error.
’Debug\MyProject.pch’ is not a valid precompiled header file

I also did a clean rebuild. whats the problem

Nitesh Singh Dec 1, 2006 - 5:33 AM

Thanks I succeeded... now I am using "Create PreCompiled header" option. And I have included Prof-UIS.h in stdafx.h. Actually one of my project was not having stdafx.h. Now I have stdafx.h for that project also...

thanks 4 da help

Offer Har Dec 1, 2006 - 5:32 AM

My settings are:

Use Precompiled Header (/Yu)
StdAfx.h
$(IntDir)/$(TargetName).pch

And it works fine.
Try to go and make sure the debug directory is empty, and then try and build.
It looks to me as some project property problems...

Nitesh Singh Dec 1, 2006 - 3:19 AM

when I am changing my project settings (for precompiled headers) from "Automatically generate" to "Use Pre-complied headers" then it is giving me compilation error.
’Debug\MyProject.pch’ is not a valid precompiled header file

I also did a clean rebuild. whats the problem


anybody can tell me about the right approach.. so that my compilation time reduces.. and how to support the "Use pre compiled header" for my case