Questions tagged [language-interoperability]
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.
language-interoperability
199
questions
1
vote
0
answers
48
views
How to create a Fortran Interface for a C function that takes a Fortran function as input using Fortran-C Interoperability?
I have a C library with a function Calculate_Integral that performs definite integration on a given C float function within specified limits and parameters. The signature of this C function looks ...
1
vote
1
answer
67
views
Kotlin interoperability issue with implementing interfaces
I'm working on migrating a web project from Java to Kotlin. During this process I'm faced with compilation issue that can make problems in the future, especially where the existing projects have to ...
1
vote
1
answer
48
views
AndroidView of compose gives:: error No view found for id 0x7f0a01d2
I have been using Jetpack Compose and koin. I am facing error as below
java.lang.IllegalArgumentException: No view found for id 0x7f0a01d2
(com.pyronixhc2.android.app:id/fragment_container_view) for ...
0
votes
1
answer
84
views
Passing and retrieving arbitrary data through a C void* from Fortran
I apologise in advance for the very long message.
I am seeking expertise in order to determine if what I am doing is safe/correct, or if alternatives exists.
I have a C library that can hold a user-...
0
votes
0
answers
13
views
How to call functions of a static typed language from an interpreter at runtime
I am implementing a simple interpreter in multiple languages. In doing so, I would like to be able to use built-in functions and methods of each language (i.e., make them interoperable). When ...
0
votes
0
answers
97
views
Directly launch SwiftUI Main App in existing UIKit project
I revamp all my view controllers in SwiftUI. But still i am bound to use hostingVC for launching my SwiftUI views from scene delegate like below
let splashVCHostingController = UIHostingController(...
-2
votes
1
answer
209
views
VisionOS Support for Mixing Swift and C++ Interoperability
I'm exploring the possibilities of mixing Swift and C++ for a project that involves VisionOS. The Swift official documentation on Mixing Swift and C++ mentions that C++ interoperability is supported ...
1
vote
2
answers
176
views
Fortran C interface for program containing non-c-interoperable derived type
I have a large Fortran code base for which I am trying to write a Python interface. I decided I would go the Cython route. However, I have derived types that are not C-interoperable. As an example,
...
0
votes
1
answer
68
views
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 ...
1
vote
0
answers
61
views
Receive array from JavaScript in Go
I'm trying to receive an array from JavaScript in my Go code
func knapsackWrapper() js.Func {
knapsackFunc := js.FuncOf(func(this js.Value, args []js.Value) any {
capacity := args[0].Int()
...
3
votes
1
answer
141
views
How can I use a Java library that has a .to method in Kotlin as it assumes I mean to use the infix operator for creating a pair
I am using the Mailgun Java API which is used to send emails. There is a .to method on a message builder that you use to populate the recipient's details. However, when I try to use this it tells me ...
0
votes
0
answers
31
views
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)...
1
vote
1
answer
81
views
C# - F# interoperability, how to get result instead of FSharpFunc
I'm learning F# and would like to write simple F# library which can be consumed from C# application. It works as expected for trivial F# functions e.g.
let Square x = x * x
From C# I can consume it ...
1
vote
2
answers
1k
views
How to use Kotlin parameter callback interoperable with a java class
This question is about the parameter callback in Kotlin, which is by the way a very nice feature from my point of view!
I have a method written in Kotlin like this one which expects a callback as ...
3
votes
2
answers
742
views
Running C++ code asynchronously in a C# program
I wrote some backend code in C++ and I wrote a frontend for it in C#. What I want it to do is run the backend code in the background so I can do other things like update a progress bar, but when I ...