How to have different Project Dependencies for each Project Configuration?

后端 未结 6 1025
不思量自难忘°
不思量自难忘° 2021-02-09 04:49

I would like to have different Project Dependencies depending on which Project Configuration I\'m currently building.

For example, I don\'t want to build and link Some

6条回答
  •  借酒劲吻你
    2021-02-09 05:30

    In the main project, go to Configuration Properties -> Linker -> Input, in the section titled "Ignore Specific Library" add the lib you want eignored, e.g.: .lib. Do this again for the other configuration, except ignore a different lib/dll.

    Finally, if you don't want each project building for both configurations, right click the Solution -> Project Dependencies -> [Select main / top-level project] -> Uncheck the project you don't want built / ignored.

    This method has the advantage that you can still manually build each project if desired, but can switch configurations and only build/use the lib/dll you want.

提交回复
热议问题