Shared file only builds once

  • Thread starter Thread starter Paul Cheetham
  • Start date Start date
P

Paul Cheetham

Hi,

I have a source file which is shared by two projects. It is included in
one project, and linked to from another.
In the source I have #if compiler directives, as I want to exclude parts
from one of the projects.

The problem I have is that the project that is linking to the file
doesn't appear to compile it with it's compiler options defined, but
seems to use the object file of the other project.

Am I missing something obvious or is there a problem with this?


Thankyou.


Paul
 
when you build the first project it uses what ever directives now when you
uses that asembly it is already built with that directive, and any set to
the directive on the second project will have no effect.
in all cases this is not a good way to do it, because mainting that code
will be a headic. I sugets that you have an bstract class and have two
diffrent direvation from it, one can be used on the first project and the
second in the second one.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top