Can I re-compile a file with new code?
-
30-10-2019 - |
Question
I have a question. I was wondering if you could re-compile code with another piece of code. For example (theoretical):
main.c:
#include <stdio.h>
void showme();
int main()
{
showme();
}
void showme()
{
fprintf(stderr, "errtest, show me");
}
Compile this file to main. (So the main is compiled) After this I want to add a piece of code.
addthis.c:
void test()
{
test();
}
Now I want to use the (compiled) main and re-compile it with addthis.c. When running it (./mainWithAddthis) should show the print 2 times.
I hope I explained it clear. Anybody an idea?
No correct solution
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow