1

I am using visual studio 2019.

I have a project A (dll) depending on a project B (static library). So when building A, it builds indeed B first. So I would like to have a preprocessor defined when building B only when built by A.

Note that I also have other projects that also use project B, but I don't want to define that preprocessor in these cases. So I can't simply define that preprocessor on project B configuration.

Also, projects A and B doesn't have any common source files.

Looks like preprocessor definitions can't be inherited.

How to do it ?

3
  • Just a thought: If your only main issue is the build order for a particular SLN, did you try setting it manually in `Project\Project Build Order..."? Commented Dec 19, 2024 at 14:06
  • Is this for C++ projects ("static library")? Commented Apr 22 at 8:55
  • it is for C++ projects, but not only static libs. (dynamic libs also) Commented Apr 22 at 12:11

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.