News:

Accounts with zero posts and zero activity during the last months will be deleted periodically to fight SPAM!

Main Menu

how to customize the functions name in dll

Started by reasoner, November 09, 2007, 06:31:41 PM

Previous topic - Next topic

reasoner

under ms windows xp
i built a simplest dll file with C::B, which has only one ex funtion "SomeFunction".
after building, i got a .dll file and a .def file.
the content of the .def file:

EXPORTS
    _Z12SomeFunctionPKc @1

_Z12SomeFunctionPKc is the function name of "SomeFunction" in the dll.
how can i customise the function name? for example i would like name it just as "SomeFunction".

THANK YOU VERY MUCH.

Ceniza

The function name becomes like that because of Name mangling, which is something C++ does. If you want to remove all of that then you must compile it as C code, or use extern "C" in C++ code.