1

Topic: Code combination on C# and With ++

I write a certain extension for a development environment. The kernel with logic on With ++, and to it "" for different IDE, in particular for QtCreator already is and it is necessary to do for a Visual Studio. And most likely on C#, as the majority of examples  for studio on C#. A question - as it to combine from the point of view of the code organization? On C# it is few experience, therefore I ask a question in this section. Certainly convenience  and debuggings is extremely desirable. Ideally simply that in one project files cs and cpp lay, but such like it is impossible. And how it is possible and how it is better to make? Through dll and to write wrappers in c#-? Very much it would not be desirable to write manually wrappers, it would be desirable that all was automatically.

2

Re: Code combination on C# and With ++

Hello, x-code, you wrote: XC> the Question - as it to combine from the point of view of the code organization? Ideally - to carry out the heavy logic in separate process and to communicate through . The plug-in of everyone supported IDE will be the client for this process.

3

Re: Code combination on C# and With ++

XC> I Write a certain extension for a development environment. The kernel with logic on With ++, and to it "" for different IDE, in particular for QtCreator already is and it is necessary to do for a Visual Studio. And most likely on C#, as the majority of examples  for studio on C#. XC> the Question - as it to combine from the point of view of the code organization? If the C ++ really is a lot of code, and managed responses in different consoles are necessary only  simple menus yes - I would look aside god forgotten, but still diligently microsoftware of a supported C ++/CLI. It is a microsoftware-onli the extension for a C ++ which allows directly in a C ++ the code to create.NET objects, to work both with normal objects and with.NET as with native, etc. Syntax certainly clumsy, but a C ++-niku to remember that ^ is one more type of the pointer should be just to spit. 3 architectural options under mood turn out approximately. All desirable debugging on idea will work in all three cases. 1) Brutalnovatyj a method: All C ++ the code to collect under a C ++/CLI and in it to make managed a wrapper for a C ++ the code. (Advantage - all is fallen down in one file, oh is not present too  the project, possibility to import "khaki" and to inflate a technical debt in any place, and the technical debt will be, a debt will be much..., in a debugger the full access to all objects (should be as it turns out in a reality of figs it knows)) 2) the Initial project to leave on a bare C ++, a wrapper to make on a C ++/CLI and in it all integration with studio. (Advantage - easy usage of all structures and classes from a C ++, an initial C + the-project + remains as and do not touch, more or less customary C ++ is used, the lack - examples on C# is direct  it does not turn out, it is necessary to interpose everyones ^ and __ gcnew) 3) the Initial project on a bare C ++. On a C ++/CLI only "bridge" for C#. Integration with studio on C#. (Advantage - is easier   the code from examples on C#, the lack - each passage between C# and a C ++ will transverse through "bridge", not such convenient debugging - in a C ++ the project its structures) will be visible only. Well and the fourth variant - to be dug in C# interop and  C#- for a C ++-dll. All very much , probably wrappers will be possible  for what-thread else C#- type monodevelop, but it is necessary to investigate a little in interop, , here it is all. With debugging - in C# the C ++ is visible only C#, in a C ++ only. Still I had cases when in casual places ceased to work all step-into, step-over, and the debugger rose only in specific .

4

Re: Code combination on C# and With ++

Hello, hi_octane, you wrote: XC>> I Write a certain extension for a development environment. The kernel with logic on With ++, and to it "" for different IDE, in particular for QtCreator already is and it is necessary to do for a Visual Studio. And most likely on C#, as the majority of examples  for studio on C#. XC>> the Question - as it to combine from the point of view of the code organization? _> if the C ++ really is a lot of code, and managed responses in different consoles are necessary only  simple menus yes - I would look aside god forgotten, but still diligently microsoftware of a supported C ++/CLI. It is a microsoftware-onli the extension for a C ++ which allows directly in a C ++ the code to create.NET objects, to work both with normal objects and with.NET as with native, etc. Syntax certainly clumsy, but a C ++-niku to remember that ^ is one more type of the pointer should be just to spit. 3 architectural options under mood turn out approximately. All desirable debugging on idea will work in all three cases. Experience prompts that it is better not to communicate without real necessity. MS badly support language. There are no built in conveniences as in C#: async/await, linq, etc. the C ++/CLI has no compilation support in different versions.NET i.e. if compilation for.NET 3.5 it is necessary to compile through VS2008, for example, is necessary.NET Core does not support it and if it will be necessary a cross connect-platformennost that came. Ourselves sat down in this pool and we can not quit till now. P/Invoke it certainly is sad, but against other restrictions not such big problem, it is especially possible to generate all code a simple script. There is still a variant to issue the code in the form of COM object, and to have other class of problems.