Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

export function name for DLL

Status
Not open for further replies.

ceodav

Programmer
Feb 21, 2003
106
IT
Hello,
i started a DLL project (my first) in VC++8.
Visual studio added autoamtically a class whose publi methods should have been exported. Actually that is true i can see the exported function using dumpbin but they have very strange name like ?Setup@CTG_ACQ@@QAEK.

I know this is the name made by the compiler where setup is my function and CTG_ACQ is the class declared as __declspec(dllexport).

How is possible to change that name?
Should i add a .def file? but this should be in conflict with the __declspec(dllexport) directive.

any help will be appreciated

thanks

Davide
 
ok solved,


if i use a class the name exported are strange, if i use extern "C" and the functions outside the class it is ok.
i wonder why, anyway

bye

Davide
 
C++ mangled names help to detect incorrect declarations in separately compiled modules on linkage stage. These strange names (for linker and debugger, not a human reading;) contain not only names as such but signatures (function parameter types, for example). Correctly declared C++ names yield identical mangled names.
In extern "C" case this useful guard is not active.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top