Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / Managed C++ / November 2004

Tip: Looking for answers? Try searching our database.

header dependency build problem in VC 2003

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
James Edwards - 23 Nov 2004 23:17 GMT
I have a VS.NET 2003 solution of many small-to-medium .cpp files, say

file1.cpp
file2.cpp
file3.cpp
...
file15.cpp

Each file includes many large STL headers, string,vector,list,map, etc.
This causes the build to be very slow when each file is compiled individually.
I'm trying speed up our build by creating a new file
"composite_file.cpp", which is simply

#include "file1.cpp"
#include "file2.cpp"
#include "file3.cpp"
.......
#include "file15.cpp"

I added "composite_file.cpp" to the VS.NET 2003 solution, and
set "file1.cpp-file15.cpp" to "Exclude from Build" in their solution
property settings.  
This builds much much faster, except that the dependencies have stopped
working.   When I modify "file1.cpp", VS.NET 2003 does not rebuild
"composite_file.cpp" when I do a "build solution".

Where are the VS.NET header dependencies stored for a .sln file, and how can
I view/add to them or force them to be regenerated?  I'm suspecting the .ncb
file.

I would rather not merge file1.cpp-file15.cpp into one huge file because
that will
increase source control merge conflicts and be less manageable.  We're not
using
precompiled headers because I've found they introduce hard-to-solve bugs
that magically disappear when you dont use them.
Tarek Madkour [MSFT] - 29 Nov 2004 21:34 GMT
"=?Utf-8?B?SmFtZXMgRWR3YXJkcw==?="
<JamesEdwards@discussions.microsoft.com> wrote in
news:046AFA3C-C3A1-4320-95B9-5F7BA27E5248@microsoft.com:

> I'm trying speed up our build by creating a new file
> "composite_file.cpp", which is simply
[quoted text clipped - 11 lines]
> stopped working.   When I modify "file1.cpp", VS.NET 2003 does
> not rebuild "composite_file.cpp" when I do a "build solution".

This should work. I tried this with a simple MFC application and I
could not reproduce this bug. Can you reproduce this with a
simple application and share the steps?

> Where are the VS.NET header dependencies stored for a .sln file,
> and how can I view/add to them or force them to be regenerated?
> I'm suspecting the .ncb file.

It's the .idb files. You cannot really view/add to them. You can
delete them and the compiler will regenerate them.

> We're not using precompiled headers because I've found they
> introduce hard-to-solve bugs that magically disappear when you
> dont use them.

What bugs are you hitting?

Thanks,
Signature

Tarek Madkour, Visual C++ Team
This posting is provided "AS IS" with no warranties, and confers
no rights.


Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.