I want to write a Macromedia Dreamweaver extension dll. Name mangling requires me to have parts of the source in a plain C module. I need access to C++ functions from there. How would I go about it?
Printable View
I want to write a Macromedia Dreamweaver extension dll. Name mangling requires me to have parts of the source in a plain C module. I need access to C++ functions from there. How would I go about it?
Ok, I found out. I can write C stubs in the cpp files by preceding them with extern "C".
Weird, I always thought this works only for declarations...
extern "C" works for everything, since a C++ compiler understands both C and C++ linking methods.
As a result, you could have an overloaded function called in two different ways from an exported C function :cool:
I would discard the C module if there wasn't for this big macro that expands to a complete function...
Did you know that even variable names (at least of globals) are mangled?
I was under the impression that everything that resolved to a linker symbol got mangled :)
Not so sure why variable names are mangled, but I suppose there was a good reason for it at the time...