<ve*******@yaho o.com> wrote in message
news:11******** **************@ g14g2000cwa.goo glegroups.com.. .
i want to copy the functions from my source file into a new file...and
convert each function into a new object file by compiling it. now, i
want to invoke the function using the object file i have created and
not by invoking the original function(i.e delete the part which has
the function and then try to invoke the same function by including the
object file into my source code). Is this possible?
Why are you trying to do this? What are you trying to accomplish? There
may be some other way you haven't thought of. Tell us the problem you
trying to solve, not your weird solution. Or at least try your solution
first and tell us what you expected and what went wrong.
I don't see how you can include and object file in your source code, as
it is probably a binary file. It doesn't make sense. You could possibly
convert the C code to Assembler and put the assembly source within an
ASM {} block or whatever (I forget the exact syntax for embedding
assembler in C).
I think object files may have offsets or stack manipulations that would
be incorrect when you compiled the new source, so even the assembler
code may not work. I may be wrong, as it could be the linker that does
this.
Classification: Bad Idea.
--
Mabden