Whenever I create dll in c++ the exported functions get decorated. How can I get undecorated functions.
class Trying{
private:
void xyz();
public:
static __declspec(dllexport) int WriteUserData(int data);
static __declspec(dllexport) string SomeFunction(string data);
}
I am exporting only the two public functions WriteUserData
and SomeFunction
. But on exporting I get decorated names like ?WriteUserData@@@@SB@@l
Most posts mention about using extern "C"
as extern "C"static __declspec(dllexport) int WriteUserData(int data);
but they are using it in functions that are outside any function. I cannot place extern "C"
before the functions inside the class as it gives error linkage specification is not allowed
.