cons-discuss
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Building a source multiple times


From: david . weidenkopf
Subject: Re: Building a source multiple times
Date: Mon, 24 Jun 2002 10:53:48 -0700


>>Do you compile the same file multiple times (with different preprocessor
defines), and then link more than one copy of the resulting object file
into the same executable?


Sorry I left that out,  they link into separate executables.

>>And is there some fixed structure to decide which version(s) of the object
file gets linked into an executable, or is this decided by the developer
during each individual compile?


It's decided by the developer, in many cases, ad hoc. There is one fixed structure, for a simulator.

>>I believe it is.  You just have to use a different target file name each
time.  I can think of a couple ways to accomplish this, if that is enough
to solve your problem.


Thanks, you just gave me the idea that they could change the target name, ie. compile a.cpp to a.obj and b.obj and c.obj.

But maybe the install technique is less tricky.

Thanks for your reply

David



Brad Garcia <address@hidden>
Sent by: address@hidden

06/24/2002 11:57 AM

       
        To:        David Weidenkopf/ATL-BTL/MS/address@hidden
        cc:        cons mailing list <address@hidden>
        Subject:        Re: Building a source multiple times

        Classification:        




On Mon, 24 Jun 2002 address@hidden wrote:

> I would like to get your opinion. We have developers who want to compile a
> source file multiple times using different preprocessor symbols in the
> same build. The objs are then linked into various executables.

I'm confused.

Do you compile the same file multiple times (with different preprocessor
defines), and then link more than one copy of the resulting object file
into the same executable?

Or does each of the resulting object files get linked into separate
executables?

And is there some fixed structure to decide which version(s) of the object
file gets linked into an executable, or is this decided by the developer
during each individual compile?

> Finally, I am wondering why the need to compile a file more than once in
> the same variant build is not supported.

I believe it is.  You just have to use a different target file name each
time.  I can think of a couple ways to accomplish this, if that is enough
to solve your problem.

You could use the Link directive to build each variation of the file in
a different directory, or you can make copies of the source file using
slightly different names, then build them.

But I probably need a better description of your problem to help you.


Brad Garcia



_______________________________________________
address@hidden
http://mail.gnu.org/mailman/listinfo/cons-discuss
Cons URL: http://www.dsmit.com/cons/



reply via email to

[Prev in Thread] Current Thread [Next in Thread]