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.

132 questions
2
votes
1 answer

How to pass arguments by reference when call python in c++ with pybind11

I'm using PyBind11 to run a Python interpreter, and I need to call a Python function in c++ with some pointer arguments. According to the docs of pybind11, it looks like that a argument being passed to Python side should be freed normally by the…
Leon
  • 1,489
  • 1
  • 12
  • 31
2
votes
1 answer

How to send a Java string to R? (rJava)

I am writing a game that revolves around guessing what words in other languages mean. For example, guessing what "hola" means in English. For this game, I am creating a scoring system that uses the frequency of the word (from Google N Gram) being…
turt1edman
  • 41
  • 7
2
votes
1 answer

How can I have CMake compile the same input file in two different languages?

I have a file named foo.bar. I want to compile it once as a C++ file, into a mycpplib library target, and once as a C file, into a myclib target; and I want to do it in the same build, with the same CMakeLists.txt. Now, I know I can arbitrarily set…
einpoklum
  • 118,144
  • 57
  • 340
  • 684
2
votes
1 answer

Lua 5.1 dll error: equals sign expected on line 1?

I have the following code: int luaopen_Library() { return 0; } Attempting to call require "Library" throws the following error: Library.dll:1: '=' expected How can I fix this? Please let me know if more information is needed; I am new to…
NetherGranite
  • 1,940
  • 1
  • 14
  • 42
2
votes
1 answer

require()ing a dll within a subdirectory in Lua

Lua's require() function, if called on a .dll, will look for a function called luaopen_. What should I do if I want to say require("folder1.folder2.library")? It's not like I can name a function luaopen_folder1.folder2.library. I…
NetherGranite
  • 1,940
  • 1
  • 14
  • 42
2
votes
0 answers

How does LuaJIT wrap C data types with the FFI?

Let's say that I have the following LuaJIT code: local ffi = require "ffi" ffi.cdef[[ typedef struct { int num; } container; ]] local a = ffi.new("container") a.num = 10 library.doSomethingTo(a) and let's say that library.doSomethingTo is…
NetherGranite
  • 1,940
  • 1
  • 14
  • 42
2
votes
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
  • 35
  • 1
  • 6
2
votes
0 answers

Running Matlab script directly from Unity3d assets

I have been banging my head against the wall with this for days now, and just can't find a solution. I have a Matlab script that I want to run from a Unity3D project's assets, but I can't make it work properly. The script itself is just fine as it…
JTDotz
  • 63
  • 7
2
votes
2 answers

How to pass a variable from php to a running perl script

I have a perl script that has an endless loop that reads an integer from the user and add it to the variable $b every time; $b = 0; while ( 1 == 1 ) { $a = ; $b = $b + $a; print $b + "\n"; } I have a php form that has an…
VFX
  • 496
  • 4
  • 13
2
votes
2 answers

C#, C++ project mix: Could not load file or assembly

I have Visual Studio 2010 solution of 2 projects: c# and c++ c++ project using .net framework libraries and exposes class that is referenced from c# project. Everything compiles fine and c# project intellisence helps me with methods exposed from…
Andrew Florko
  • 7,672
  • 10
  • 60
  • 107
2
votes
2 answers

instantiate python class into C# using the class name as string

This SO question provides code to create an instance of a python class in C#. The following code forces to know the python function name in advance. However I need to specify the class name and the function name to be executed by…
Santi Peñate-Vera
  • 1,053
  • 4
  • 33
  • 68
2
votes
0 answers

Usability for I/O and handling of large data sets

I am trying to figure out what to use for a project (fully free & open source) that will make certain legacy data more accessible to other programmers. I'll try to not go into details, but the data sets contain large amounts of floating-point (32…
Bert Bril
  • 371
  • 2
  • 12
2
votes
1 answer

Is there a way to deserialize raw byte[] back into thrift object without knowing its thrift type?

I'm running a project that requires inter-communication between different programming languages (mostly java, c++). could serialize/deserialize into both binary format and json format. IDL to generate class code for different languages Thrift…
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,516
  • 9
  • 32
  • 50
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
  • 8,210
  • 11
  • 44
  • 71
1 2 3
8 9