c++ - Can GCC compile and run a source code without generating object or executable files? -
can gcc compile , run source code without generating output file (neither object nor executable), in manner supported cross-platform? especially, solution supported gcc directly.
i want avoid generation of trace file since minor code in big project. messes bin directory.
an existing question, here, provides solution compiling source code without generating output file, such as:
gcc somefile.c -o /dev/null
however, compiles, , doesn't run.
another similar question here provides solution specific windows os, not cross-platform.
in order compile , run c / c++ program , remove compiled file, should add function delete program after executed.
here link example of program deletes itself. click here
Comments
Post a Comment