PW> .MSGID: 3:640/772.3 c14611c6
PW> I've noticed that gcc likes to mangle my C++ functions by adding info
about
PW> the parameters to the end of the symbol. Of course, this is ridiculous
when
PW> I want to call these functions from ASM code, so I was wondering if there
was
PW> a way of preventing that kind of mangling from occurring. TIA.
PW>
PW> --- PPoint 2.00
Er.. Yes and no. ALL C++ compilers do name mangling. This is how
functions are overloaded. In general it is a bad Idea to call C++
from ASM since [non-static] C++ member functions are passed an
implicit pointer to the object upon which they operate. (The "this"
pointer, about which you may have heard.) The best way to avoid this
is to redefine the methods you want to call from ASM as "C" instead of
as C++.
Good Luck
Pedro
---
þ KWQ/2 1.2i þ If at first you don't succeed, put it out for beta test.
---------------
* Origin: St. Louis Users Group (1:100/4)
|