c#c ++循环引用 [英] c# c++ Circular reference

查看:112
本文介绍了c#c ++循环引用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个c ++ dll A.dll 和一个C#dll B.dll。     


我希望C ++为C#提供一些接口,而C ++需要调用C#接口,例如  init()destory()。


但是我得到了一个循环引用错误! 我该怎么办?


 

解决方案


我有一个c ++ dll A.dll  ;和一个C#dll B.dll。     


我希望C ++为C#提供一些接口,而C ++需要调用C#接口,例如  init()destory()。


但是我得到了一个循环引用错误! 我该怎么办?


 


你有没有研究过很多参考文献(没有双关语)类型

的问题可以在网上找到?例如 -



什么是循环依赖性以及我们如何解决

https://www.codeproject.com/Articles/616344/What-is-Circular-dependency - 以及我们如何解决



如何解决循环依赖?

https://forums.asp.net/t/1053863.aspx?How + to + resolve + circular + dependencies +



如何解决循环引用?

< a href ="https://stackoverflow.com/questions/6928387/how-to-solve-circular-reference"> https://stackoverflow.com/questions/6928387/how-to-solve-circular-reference



解决因类间循环依赖而导致的构建错误

https://stackoverflow.com/questions/625799/resolve-build-errors-due-to-circular-dependency-amongst-classes



还有许多其他例子 - 选择一个适合你的例子。



- Wayne


I have a c++ dll A.dll  and a C#dll B.dll.     

I want C++ to provide some interfaces to C#, and C++ needs to call C# interface such as  init() destory() .

But I get a Circular reference Error !  what should i do?

 

解决方案

I have a c++ dll A.dll  and a C#dll B.dll.     

I want C++ to provide some interfaces to C#, and C++ needs to call C# interface such as  init() destory() .

But I get a Circular reference Error !  what should i do?

 

Have you researched the many references (no pun intended) to this type
of problem which can be found on the Web? e.g. -

What is Circular Dependency and How Do We Resolve
https://www.codeproject.com/Articles/616344/What-is-Circular-dependency-and-how-do-we-resolve

How to resolve circular dependencies?
https://forums.asp.net/t/1053863.aspx?How+to+resolve+circular+dependencies+

How to solve circular reference?
https://stackoverflow.com/questions/6928387/how-to-solve-circular-reference

Resolve build errors due to circular dependency amongst classes
https://stackoverflow.com/questions/625799/resolve-build-errors-due-to-circular-dependency-amongst-classes

There are many, many other examples - pick one that works for you.

- Wayne


这篇关于c#c ++循环引用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆