Questions tagged [cross-language]

In programming, "cross-language" or "multi-language" refers to features that operate across multiple programming languages.

In programming, "cross-language" or "multi-language" refers to features that operate across multiple programming languages.

Cross-language features include type systems, data formats, storage layouts, etc. which are common across multiple languages. They help applications or services written in different languages to inter-operate and exchange information.

112 questions
2
votes
3 answers

Is it possible to create C++ objects from C#?

I'm currently working on a Game project, so I'm developing my editor in C# because it would take alot of time to do it in C++ so for efficiency I use C# as the editors primary language, to get results quick. However, is it possible to create a Game…
Deukalion
  • 2,186
  • 7
  • 29
  • 47
2
votes
2 answers

Blending languages - Python and Objective-C

I know Objective-C++ can exist because Objective-C and C++ share common ground in C. But how can Objective-C coexist with Python? I know it must be possible because wxPython uses Cocoa to draw interfaces. I'm writing a card game engine for OS X. It…
Michael Dorst
  • 6,449
  • 10
  • 35
  • 64
1
vote
2 answers

Sending object via socket, but different language client, how to make the object serialize?

I have a Java Server that sending the java serializable object to my client, and receive java serializable object for execution. If my client is also java written, which is nice, that allow me to do communication within any problems. But now, I…
DNB5brims
  • 25,200
  • 45
  • 121
  • 180
1
vote
1 answer

protobuf-net or protocol buffer services from c# to python and other lang

I have been looking at protobuf-net recently and protocol buffers and so far it seems quite impressive. What i am wondering about is the service side of things. If i have understood the google documentation right you can declare services in the…
1
vote
1 answer

Is this possible for C to execute a piece of js code?

For example, I have a js code, and I while like to write a simple console program that read this code, execute it, and print back the result. Is this possible to do so? If yes, how can I start doing this? Thank you.
DNB5brims
  • 25,200
  • 45
  • 121
  • 180
1
vote
2 answers

Importing C methods/classes into a C# project

I have some c headers, and a c lib that I'd like to import and use in a c# project. How can I do this?
Malfist
  • 29,255
  • 58
  • 174
  • 263
1
vote
2 answers

How to handle a C++ header file with a extern call to C function and a class object

I am trying to compile an application involving both C and C++ files. With one particular header I face issues. The file in question (a C++ header file), would look something like this: #ifndef TASK_H #define TASK_H #include "MyCCPObject.h" int…
mmcblk1
  • 96
  • 2
  • 9
1
vote
3 answers

How can I throw an NSError from a Swift class and catch it in an Objective-C class?

I need to implement a try-catch structure in Objective-C to handle Swift thrown NSErrors. I've written an NetService manager with Swift code and I am implementing it on an already existent Objective-C UI. However, whenever I throw an error from my…
1
vote
1 answer

Managing project agnostic code libraries without creating dependencies

I'm curious to know how fellow developers manage project agnostic code/libraries? For example, given these two functions: function array_exclude_keys(Array $array, Array $keys){ foreach($keys as $key){ unset($array[$key]); } …
Dan Lugg
  • 18,516
  • 18
  • 99
  • 168
1
vote
2 answers

How can I pass a C# String-like variable to a sbyte* parameter?

I inherited a C++ DLL with its related header file, with functions declared like int func1(int i); int func2(char* s); I also inherited a reference VC++ reference class that wraps the above DLL to be used in C# environment public ref class…
Daniele Nardi
  • 25
  • 1
  • 5
1
vote
1 answer

D problems with static arrays and C interoperability

I have problems passing D struct that contains static array to C. D code: extern (C){ struct vec3f{ float[3] array; } void testVec3f(vec3f v); } ... void test(){ float[3] ar = [1f,2f,3f]; vec3f v = vec3f(ar); …
Rulli
  • 35
  • 4
1
vote
1 answer

mmap a same file in both C and Python, will it really use the shared memory? will mmap work across different programming languages?

By doing the reading from C code and writing from python, I couldn't see in my C the changes that i am doing in python. Hence I would really like to know whether mmap work across language like C and Python or am I doing mistakes here, Please let me…
viki
  • 13
  • 3
1
vote
1 answer

Add pointer to defined Objective-C class in .h file of Objective-C++

Is possible to create class in Objective-C++ which has field that is a pointer to an Objective-C interface ( inside the .h file ) ? To clarify a little, I created one Objective-C interface: // Our platform independent class @interface…
PaolaJ.
  • 9,104
  • 19
  • 62
  • 100
1
vote
2 answers

Scala Object in Java

I have zero encounter with Scala. I'm returned an scala object by a library(kafka) of the following type: kafka.coordinator.GroupMetadataManager$$anon$2@2b9ee60f I tried to pass this to Scala to get some meaningful information. i.e. to access the…
Ansel Zandegran
  • 496
  • 5
  • 16
1
vote
0 answers

How to use a Perl code inside a php code

I have this Perl script: use strict; use warnings; use WordNet::QueryData; use WordNet::Similarity::random; use WordNet::Similarity::path; use WordNet::Similarity::wup; use WordNet::Similarity::lch; use WordNet::Similarity::jcn; use…
VFX
  • 456
  • 3
  • 10