在Visual Studio中为单个解决方案编译和使用多个项目

时间:2016-06-13 10:48:14

标签: c++ visual-studio visual-studio-2015

我正在使用Visual Studio 2015社区版。我正在尝试构建一个非常基本的游戏引擎。我想将引擎的Core部分与物理和渲染代码分开。我知道如何将辅助Physics和Renderer项目添加到主Core解决方案中。但是,如何设置关系,以及如何访问解决方案Core部分中的Renderer和Physics文件?是否需要对项目属性(如链接器和VC ++目录)进行必要的更改?

1 个答案:

答案 0 :(得分:0)

<project name> (Core)
  <solution1> (Core project)
  <solution2> (Physics)
  <solution3> (Renderer)

在核心项目中,您想要使用Physics和Renderer。要在它们之间链接项目,请在链接器和VC ++目录(Core project -> options -> common properties -> references -> add new reference -> check Physics and RendererC/C++ - > general -> additional include directories and Linker - > general -> additional include directories

之后设置该设置后转到Linker - > general -> input -> additional dependencies