If I use extern "C" to define a function in a C++ DLL, do I still need to use a .def file to avoid name mangling?
Cheers
Printable View
If I use extern "C" to define a function in a C++ DLL, do I still need to use a .def file to avoid name mangling?
Cheers
Yes, you have to use a .def file in this case :)
tried it out and didn't need a def file if extern "c" is used....
:rolleyes: I had too, but well if it works for you.. great ;)
Don't know, but when I looked at it using a Dependency Walker I still saw the weird names and couldn't use them, after inclusion of a .def it did work... weird :confused:
on futher tests I discovered that you only need to put the function prototype in the extern "C" brackets. Did you try that?
No I haven't... thanks for the info!!!