[Visual Studio] Use recompiled without recompiling the whole project using it

Started by
11 comments, last by Hodgman 13 years, 11 months ago
Quote:Original post by maxest
1. Lib has 100 files, app has 100 files. I changed something in lib file - I recompile this one file within the lib. Now I need to recompile the whole application (100 files) just becuase I had recompiled one file from the lib ?(!)
Wait... what?
That shouldn't happen. If the lib changes, there's no reason that all 100 of the app's source files should have to be recompiled.
All that should have to happen is that the app is re-linked (without re-compiling anything).

Are you sure you're not editing a lib-header which is included by all the app-source files?
Advertisement
I think I'm gettin this, but let me reformulate the problem again and consider it.
I have my gaming engine and I want to develop the application based on it. So I want the engine to be a separate project that produces lib and I want the game to use that lib. However, I would be modyfing the engine and game constantly. In this case it simply doesn't seem to pay off have the engine as separate lib, because every single change in engine's source will entail recompilation of game code. So in that case it's simply better to have engine and game in one project, right?

EDIT:
Quote:
Wait... what?
That shouldn't happen. If the lib changes, there's no reason that all 100 of the app's source files should have to be recompiled.
All that should have to happen is that the app is re-linked (without re-compiling anything).

Are you sure you're not editing a lib-header which is included by all the app-source files?

At the time I'm not editing anything, these are all considerations here before I reorganize my project ;)

So you say that after change in lib's SOURCE file I only need to relink the application? And after modyfing header file I need to recompile app's sources that use that modifed header and relink app with the lib?
Quote:Original post by maxest
However, I would be modyfing the engine and game constantly. In this case it simply doesn't seem to pay off have the engine as separate lib, because every single change in engine's source will entail recompilation of game code. So in that case it's simply better to have engine and game in one project, right?
In my project, the engine is made up of about 9 libs, and the app as 1 lib and 1 exe.
I'm constantly editing all of these libs -- when I do that, I don't have to recompile anything (I just have to re-link the exe)!
[edit]
Quote:So you say that after change in lib's SOURCE file I only need to relink the application? And after modyfing header file I need to recompile app's sources that use that modifed header and relink app with the lib?
Yes. Furthermore the IDE does this for you (figures out which files need to be relinked/recompiled, so you don't have to any of it manually).

This topic is closed to new replies.

Advertisement