Is there an alternative to C++ dynamic libraries?

This is the cry of the soul!

Hello.
I chose Python as my primary programming language. And honestly, no regrets!
I can program on Windows, Linux.
But!
There are times when I can't find the exit!
1) Creating dynamic libraries under a compiled programming languages;
2) Productive code;
3) Programming for Android;
Kivy? Funny...
4) etc...
Moreover, the first is for me the most important.
I only see 3 options. But none of them satisfies my needs completely!
1. C++:
1) Yes;
2) Yes;
3) No!
No, you can! But compare the C++ code under Android and C#/Java code, and you will understand what I mean.
Thus, there is a plus. C++ and Python can be used together!
2. C#:
1) No;
2) Yes;
3) Yes.
3. Java:
1) No;
2) No;
3) Yes.
Is there an alternative to C++? Or to breathe, to exhale and to learn C++ and C# using C++ only for dynamic libraries?
Thanks in advance!
April 19th 20 at 12:30
1 answer
April 19th 20 at 12:32
You probably do not know how to cook.
C# allows you to export as COM objects and callable functions
https://sites.google.com/site/robertgiesecke/Home/...
class Test
{
 [DllExport("add", CallingConvention = CallingConvention.Cdecl)]
 public static int TestExport(int left, int right)
{
 return left + right;
 } 
}


About Java I'm not sure, but I suspect is the same.
And Yes you offended by all Aviston saying that it is the brakes. This is an extremely bold statement from piconera
That is, the output I can get a DLL that I can use in C++? Are you serious? - Erna commented on April 19th 20 at 12:35
@Erna, the output in Java you will be able to .jar, which you can use in other Java.

Or do you want the same language to write libraries for other languages? Don't do that. - zoey_Spinka commented on April 19th 20 at 12:38
@Erna, try that way?
Pile up can create a project with a stub that will only export functions.
H and lib file can be used for linking and will put a dll from C# - Heath_Romaguera commented on April 19th 20 at 12:41
@zoey_Spinka, in C (or c++) write library for python - aaron_Weber commented on April 19th 20 at 12:44
@aaron_Weber, in Python also write libraries for Python.

You need to understand that in C/C++ libraries to write but platform windows/linux.

In system programming, C/C++ of course in the lead. And a little C# - zoey_Spinka commented on April 19th 20 at 12:47
@zoey_Spinka,
Don't do that.


And here C++ developers have laughed at you... - Erna commented on April 19th 20 at 12:50
@Erna, Keep the project template. There is one nuance. For C# you need to explicitly set the architecture. That would match the type of the native application.

https://yadi.sk/d/gZ7wUIimYMHAlQ - Heath_Romaguera commented on April 19th 20 at 12:53
@Erna, You are confusing libraries and platform extensions and libraries for the programming language. Rephrase a question. - zoey_Spinka commented on April 19th 20 at 12:56

Find more questions by tags Programming