开发者

Shared Object Files

I have two projects within one solution. Both projects contain some files开发者_C百科 that are the same. For instance, Project1 contains shared.cpp and so does Project2. However, when I edit shared.cpp and build both projects, is there any way I can make VC++ compile the source file once, then use the single object file in the linking of the two projects, rather than compiling it twice? The obvious purpose being to decrease build time.


Put shared.cpp in a separate project in the same solution and make it build as a library. Then add that project as a dependency to project1 and project2.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜