문제

Is it possible to define a public void at the namespace scope (that can pass through ABI and later be used inside an JavaScript project)? Of course, "public void update(int param);" doesn't work as public seems to be invalid keyword in this context. The alternative is to make a class to hold that method but I would like to avoid that and have a function at the namespace scope.

Thanks

도움이 되었습니까?

해결책

No, you cannot have a namespace-scope function that goes across the ABI. I recommend making a wrapper class and making the function a static.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top