这是我在 Visual Studio 2010 中的构建输出的片段:
1>------ Build started: Project: Engine, Configuration: Release_PG Win32 ------ 1>icl : warning #10187: PGOPTI instrumentation disables multifile optimizations 1>icl : warning #10188: PGOPTI instrumentation disables IP optimizations
1> !BasketNovel.cpp 1> Compiling precompiled.h - this should happen just once per project. 1> 1> Compiling BasketNovel.h. 1>
1> Camera.cpp 1> Compiling precompiled.h - this should happen just once per project. 1> 1> Compiling BasketNovel.h. 1>
1> Console.cpp 1> Compiling precompiled.h - this should happen just once per project. 1> 1> Compiling BasketNovel.h. 1>
1> Entity.cpp 1> Compiling precompiled.h - this should happen just once per project. 1> 1> Compiling BasketNovel.h. 1>
1> Font.cpp
据我所知,编译器正在按字母顺序构建我的 .cpp 文件。我不太熟悉构建概念。这是正常行为吗?
注意:我使用的是英特尔 C++ 编译器。
最佳答案
编译的顺序并不重要。构建最终产品(可执行文件、库等)的重要步骤是链接步骤,编译步骤中的各个部分将链接在一起。
关于C++ 字母构建顺序,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13643302/