Open HyVong007 opened 3 years ago
"transfer C++ to C#" is not a good idea. try compile project to create Dll file and use 'DllImport' import c function. ref: https://stackoverflow.com/questions/19450783/how-to-use-dllimport-in-c
To be able to use for C#, the C++ source code must be "P-Invoke" format, not PURE C++ ! Tell me if i was wrong ? if i compile a "Pure C++" to a DLL file, i am not sure if i could use file.DLL for C# ??
On Sat, May 8, 2021 at 2:50 PM Bread @.***> wrote:
"transfer C++ to C#" is not a good idea. compile project to create Dll File ref: https://stackoverflow.com/questions/19450783/how-to-use-dllimport-in-c
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/gomoku/Carbon-Gomoku/issues/1#issuecomment-835184786, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEZ4J3ZKGUOY74MLEIQWOG3TMTUNJANCNFSM436OJYXA .
you are right! you have to export function like: extern "C" __declspec(dllexport) void foo();
Thank you very much
I want to use this lib in Unity3D game. please help