No, it is not possible to compile c code as part of a Delphi project.
You can compile c-code using C ++ Builder and use object files ( *.obj ) in Delphi applications by linking them to {$L file.obj} and then calling them just like any other Delphi function, but you must provide c-runtime library functions. (There are some crtl.pas available in the block ( System.Win.crtl.pas in XE2 / XE3), any that are not there, you need to write Delphi replacements for yourself).
For an example of how to do this, you can see how ZLib is used by looking at Zlib.pas ( System.ZLib.pas in XE2 / 3).
As mentioned in the comments on your question, you can configure the pre-build event to launch your compiler c immediately before your project is built, which will work; technically, I'm not sure if this is considered “compilation as part of your project” or not, as it actually starts the external process. However, the above information still applies in this case.
source share