Thanks for the suggestions. I tried them,
but didn't get the expected results.
1. The generated output (.c) file is stored in the
which, in my case is:
2. The relevant tool settings are as
(a) Tool that generates .c file
(b) Tool (C compiler)
that accepts .c files as input
Still, the .c file gets compiled.
Is there anything additional for the tool
As for the suggestion of renaming the .c to .h, I'm
afraid that would cause
problems for users.
Date: Thu, 7 Sep 2006 11:14:51 +0200
From: wieant@xxxxxxxxx (Wieant
Subject: Re: [cdt-dev] outputType of tool is .c file
General developers list." <cdt-dev@xxxxxxxxxxx>
> One of the tools in my toolchain
generates a .c file as output.
> This .c file is then used in sources
> Since the file has a .c extension, the 'C
compiler' tool goes ahead &
> compiles this to a .o This step should
not happen in my case. I end up
> getting link time errors due to
> Is there any way I can stop the C compiler from
building this output .c file?
You could try to
use/change the 'outputType' sub element of your tool
the 'buildVariable' attribute of the 'outputType'
element might result in
the generated .c files not ending up in the objects
macro list, hence not
being compiled/linked. You then have to ensure that
your tool is still
being executed, so the .c files including your generated
somehow get a dependency on your new buildVariable.
When the generated
.c files are however generated within the project
directory you still have
a problem, as the updated makefile will probably
include them in the
standard .c sources list.
All in all Dereks suggestion might be
Thu, 7 Sep 2006 13:16:40 +0400
From: "Sennikovsky, Mikhail" <mikhail.sennikovsky@xxxxxxxxx>
RE: [cdt-dev] outputType of tool is .c file
To: "CDT General developers
building the generated .c files with your compiler you should
1. The generated .c files should be stored within the build
2. In your definition of the tool that generates the
.c files the
outputType that represents .c files should contain the
that differs from the buildVariable attribute of the
inputType of your
compiler that accepts .c files. This should prevent the
files from being used by your compiler