Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cdt-dev] outputType of tool is .c file

> One of the tools in my toolchain generates a .c file as output. 
> This .c file is then used in sources (using #include...)
> 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 this.
> 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
definition. Changing 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
sources should 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 easier...


Back to the top