Language Interoperability is the ability of code to interact with code that is written using a different programming language. Language Interoperability can help maximize code reuse and, therefore, improve the efficiency of the development process.
Questions tagged [language-interoperability]
193 questions
1
vote
4 answers
How to allocate static object defined in a Swift class inside an objective-C class?
How do I access to the shared instance of "SharedManager" declared in my Swift file from my Objective-C class?
Steps:
I have declared an object in a Swift file as following:
Swift Class Declaration:
From this [instructions][1] I did:
// Swift…

mm24
- 9,280
- 12
- 75
- 170
1
vote
1 answer
Using @objc attribute for a Swift class that doesn’t inherit from an Objective-C class
The following paragraph from the section on Interoperability of the Using Swift with Cocoa and Objective-C (Swift 2.1) documentation seems to suggest that there is a way to use a Swift class that does not inherit from an Objective-C class for…

Mark Kang
- 161
- 11
1
vote
0 answers
Call Python function from MATLAB With two or more output arguments
I am having problems calling a Python function in Matlab.
The question has already been answered on this website, Call python function from MATLAB, But solutions are not usable for me.
The topics presented above are several ways to use Python…

Pepe
- 11
- 2
1
vote
2 answers
Platform-Independent Java <-> C# Interoperability
We want to use existing C# sources within our Java project. So far, this would not be a great problem since using e.g. Java Native Interface (JNI) is quite straight forward.
The problem is that the software shall also run on non-windows OS. So, we…

Stephan Hutterer
- 67
- 7
1
vote
1 answer
how do I bridge a function taking a closure as a parameter to objc
I have
func verifyEmail(let email: String, let completionHandler:(Bool) -> Void) -> Bool
{
in my (swift) framework
exposing it as
FOUNDATION_EXPORT BOOL verifyEmail(NSString *email, void (^completionHandler)(BOOL verificationResult));
in my…

Anton Tropashko
- 5,486
- 5
- 41
- 66
1
vote
1 answer
Use C++ API in C# Project
Is it possible to use a C++ API (series of Header files and CPP files) in a C# project?
Maybe its possible to compile these files into .obj or .lib files and include them in the Visual C# project? Something similar is done for Crypto++.
If it is…

Mack
- 179
- 3
- 13
1
vote
2 answers
is it possible to call any host c/c++ function from lua script by function address?
I have compilied console host program written on c/c++ (i don't have sources). Host program have support for lua scripts (probably using lua virtual machine). Host program load lua…

user3309760
- 175
- 1
- 6
1
vote
1 answer
Passing objects interoperably - JavaBean to C#
Is there any library out there that will allow developers to pass objects from one language to another and then manipulate/change the objects and pass them back?
This would be a great and simple alternative to Messaging and XML systems out there. I…
user1191027
1
vote
2 answers
managed dll in native code (via com) .is it in process or out process com server?
i needed to use a managed dynamic linked library(c#) in my native code(c++).i found the solution
here it was.
(http://support.microsoft.com/kb/828736).
but the thing that is bothering me is..
1) are managed dynamic linked libraries used in…

sandeep bisht
- 111
- 12
1
vote
1 answer
Access array of C++ structs from Fortran?
In C++, I allocate an array of S. In Fortran, I want to access elements of this array. How can I do this?
C++:
struct S {double a; double b;};
S *arrayOfS;
arrayOfS = (S *)new S[123]; // allocate
Fortran 2003:
USE ISO_C_Binding
TYPE, BIND(C) ::…

Woody20
- 791
- 11
- 30
0
votes
1 answer
C-Fortran character string interoperability
Good day. Sorry for maybe not so understandable definition of my problem and maybe some inaccuracies - I'm just starting to try myself in programming. Still, I'll try my best to explain everything plain.
I have mathematical DLL written in…

AntalOvc
- 85
- 11
0
votes
1 answer
Is there any way to show error msg to user from worker thread in IOS from Appdelegate before root view controller is instantiated/created?
I want to show user a alert in case my application stop before creating a window to show root view controller and i want to do this from a worker thread which will be running in a cpp file and will be calling swift file before a…

Abhishek
- 1
- 3
0
votes
0 answers
Value of Derived Type changes unexpectedly in C-Fortran Interoperability Code
In the following Fortran code which uses C library the value of tol changes unexpectedly. What might be the reason behind this behaviour?
PROGRAM ComplexIntegral
USE farblib
IMPLICIT NONE
TYPE(fmag_t) :: tol
TYPE(facb_t) :: s, t, a,…

Akhil Akkapelli
- 85
- 6
0
votes
0 answers
call python from C++/mql5
I am testing just a small change to this code here: https://github.com/Roffild/RoffildLibrary/blob/master/Libraries/Roffild/PythonDLL/mql_class.c
but it raised exception that I couldn't catch. Anybody has a clue why at least from a look at the…

pqdzung
- 1
0
votes
0 answers
is there deep learning python script execute and get result from matlab possible
def squared(x):
y = x * x
return y
if name == 'main':
squared(x)
I am expecting the above code executed from matlab and get result in matlab variable.

Share Knowledge
- 11
- 1