Can you make a VC++ Solution set preprocessor #defines on loaded projects?

前端 未结 2 1947
盖世英雄少女心
盖世英雄少女心 2021-01-13 10:40

I have a library which supports a #define to control how it\'s built. However the library can be used by multiple EXE projects which want different versions. Can I make the

2条回答
  •  不思量自难忘°
    2021-01-13 10:57

    You'll need separate build configurations for each library version that any of your applications requires. That's how the build system is designed.

    The only way out would be to add the source code for the 'library' directly to the respective application projects and set the correct preprocessor settings per-project - this way, you still have the benefit of a shared codebase.

提交回复
热议问题