Raghu wrote:
Hello all,
I need small help regarding the diffrences of .obj files .
what is the difference in the .obj files in the following two cases apart
from teh names of the variables and functions?
1) the .obj file created when x.c is compiled noramlly as a "C" file?
2) the .obj file created when x.c is forced to be treated as CPP file by
using compiler option /TP?
How can one remove the differenceds between these two.
Thanks in advance
Best Regards
Raghu
This is compiler-specific and beyond the scope of standard C++. See
this FAQ for some places where you might get a better answer:
http://www.parashift.com/c++-faq-lit...t.html#faq-5.9
However, the biggest thing that might happen is that names might be
mangled in the C++ version unless they are qualified by extern "C". You
might be able to get around this in any number of ways, e.g., defining
a compiler-specific alias for a function so that a C program can call
the C++-mangled version. I'd suggest consulting a group for your
compiler for a more throrough answer.
Cheers! --M