Skip to content
This repository has been archived by the owner on Jul 26, 2023. It is now read-only.

clould be develop an automatic import system or tool to use that in C# code? #455

Closed
sgf opened this issue Jun 12, 2020 · 1 comment
Closed

Comments

@sgf
Copy link

sgf commented Jun 12, 2020

Reason:
Regarding the work of the library's wapper (binding), Human maintain is very inefficient
This prevents us from fully using the native ecology of C/C++. Even though many projects have manpower for porting works.But it is difficult to sustain in the long run. This price is too high.

We need a grammar tool similar to the following. Automate these tedious things.

namesapce XXXApi{
using extern(C) "xxx.h"
using extern(C++) "yyy.h"
using lib("xxx.lib")  //or "xxx.so"
using lib("yyy.dll") //or "yyy.a"
}

and the ide automatic generate the port(Wapper) code
and then we can direct use:

class ApiTest
{

void TestSomeNative()
{
  var str=string.empty;
  int val=123;
  XXXApi.SomeFunction(str,val,....); //call the function defined in xxx.h
  new XXXApi.SomeClass(?...);// create some class/struct instance defined in yyy.h 
}


}
@AArnott
Copy link
Collaborator

AArnott commented Jun 14, 2020

Duplicate of #56

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants