[Scons-users] Two different environments were specified for target

Dirk Bächle tshortik at gmx.de
Fri Feb 14 12:45:52 EST 2014


Hi Phil,

On 14.02.2014 18:01, Philipp Kraus wrote:

>

> Yes I have got duplicated targets e.g. my "logger.cpp" is used in each

> target. The warning is correct:

>

>

> scons: warning: Two different environments were specified for target

> /project/core/logger/message.o,

>

> but they appear to have the same action: $CXX -o $TARGET -c $CXXFLAGS

> $CCFLAGS $_CCCOMCOM $SOURCES

>

> File "/project/test/logger/build.py", line 32, in <module>

>

>


the solution is to either

- use the same Environment for building both programs, or
- create a library from the common source files and then link against
that for both programs.

In general, you can build each File node (identified by its full path)
only once from a single Environment per
SCons run.

Best regards,

Dirk

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://four.pairlist.net/pipermail/scons-users/attachments/20140214/5044c3c1/attachment.html


More information about the Scons-users mailing list