[C++ learner question]
Saya47 opened this issue · comments
Saya47 commented
Hello! I'm a new C++ learner! I see that your function names are not mangled by the compiler but I don't see you use extern "C"
anywhere in your code, can you please teach me how you do this?
Jari Pennanen commented
If you are exporting functions in a C++ file, you have to either place the decorated names in the DEF file or define your exported functions with standard C linkage by using extern "C".
https://docs.microsoft.com/en-us/cpp/build/exporting-from-a-dll-using-def-files?view=vs-2019
See this file:
https://github.com/Ciantic/VirtualDesktopAccessor/blob/master/VirtualDesktopAccessor/dllmain.def