Questions tagged [mono-embedding]

33 questions
12
votes
1 answer

embedding mono with C# "out parameters"

I'm trying to embed a C# class in a C application using libmono, but the documentation is a bit lacking. I'm trying to call a method with the prototype void MessageToSend(out MessageObject message); How do i represent the "out parameter"? is it a…
Woodrow Douglass
  • 2,605
  • 3
  • 25
  • 41
10
votes
2 answers

Embedding: mono vs lua

I am interested in hearing about peoples experience with embedding mono (open source implementation of .NET) in a C/C++ application. How is it to distribute such an application and what are the dependencies? I have tested on OS X and mono comes as a…
Erik Engheim
  • 8,182
  • 4
  • 36
  • 51
6
votes
1 answer

Get generic type using Mono embedded

How to I create a generic List object using mono embedded calls? I can get List's MonoClass: MonoClass* list = mono_class_from_name(mscorlibimage, "System.Collections.Generic", "List`1"); and I see in docs that there's…
queen3
  • 15,333
  • 8
  • 64
  • 119
5
votes
0 answers

What's the difference between monosgen-2.0.dll and libmonosgen-2.0.dll?

I'm trying to embed Mono in a c program as in http://www.mono-project.com/docs/advanced/embedding/ with SGen GC. In the mono distribution in C:\Program Files\Mono\bin there are two different mono dll with SGen support: monosgen-2.0.dll, size :…
Mikezz9
  • 51
  • 1
5
votes
1 answer

mono embedding, call a C# generic method from C

I am having trouble figuring out how to call generic method (both static and non-static) from C. The biggest culprit is that calling generic methods is essentially undocumented, there are no examples in the mono repository but there's a mention that…
krdx
  • 1,315
  • 15
  • 22
4
votes
2 answers

Debugging C# assembly launched by embedded mono runtime?

I am talking about a small game engine using C# for game programming. So, I have a C++ app embedding mono runtime (I call it 'launcher'). And I have an assembly written in C# which is my game engine class library. The launcher launches the assembly…
Anton Petrov
  • 782
  • 1
  • 8
  • 19
4
votes
1 answer

embeded mono - load assemblies from memory

I'm trying to load mono assemblies from memory. My question has two parts, first: when I use mono_image_open_from_data and mono_assembly_load_from combination the assembly dependencies are not loaded. If I load assembly dependencies manually with…
KooKoo
  • 451
  • 3
  • 20
3
votes
1 answer

Embedded Mono: Creating / marshaling a C# struct in C++

I'm working on an application that's embedding Mono, and I have a simple C# struct that is one of the parameters to one of my functions. How do I create and pass that struct from C++ to C#? If I have a C# struct like so: struct CSStruct { int…
Jeff
  • 5,746
  • 4
  • 33
  • 40
2
votes
1 answer

Mono runtime crash when embedding in C++ application on Linux

Background / Description of problem I'm trying to run c# scripts as part of my c++ application which I'm compiling in Debian-9 Linux. However, my application crashes with an error from coming from the mono runtime. I have installed mono from Debian…
Antiro42
  • 177
  • 8
2
votes
0 answers

Mono Embedded migration to 4.0.4 and further support

i have migrated from mono 3.12 to the newer mono version 4.0.4. http://www.mono-project.com/news/2015/05/04/mono-4-0-is-out/ Could someone point me to a mono embedded tutorial based on the new mono 4.0.4 release? I tried the simplest tutorial…
tomy
  • 434
  • 4
  • 10
2
votes
2 answers

Embed Mono: cannot find mono-2.0.dll

I'm on windows 8.1 using VS2012. I am trying to follow http://www.mono-project.com/docs/advanced/embedding/ to embed the Mono CLR into a C project. After some issue, I have it compiling now. I used the .def file in the article:…
obiwanjacobi
  • 2,413
  • 17
  • 27
2
votes
1 answer

Embedded Mono: EXC_BAD_ACCESS (SIGSEGV) when calling mono_jit_cleanup()

I'm embedding Mono runtime into existing Cocoa application. I've built the latest runtime from GitHub (master branch) and exiting application after running some managed code gives me this during the…
dipyalov
  • 118
  • 1
  • 5
1
vote
1 answer

ParameterError: Mono data must have shape (samples,). Received shape=(1, 87488721)

Currently I am working speaker Diarization on python where I am using pyannote for embedding. My embedding function looks like this: import torch import librosa from pyannote.core import Segment def embeddings_(audio_path,resegmented,range): …
Sarla Devi
  • 49
  • 1
  • 10
1
vote
0 answers

How to instantiating generic class from internal call, getting crash "Cannot transition thread ... from STATE_BLOCKING with DO_BLOCKING"

I'm embedding mono and trying to instantiate generic class from internal call using mono API. I obtain List from core lib, then create List by calling Type.MakeGenericType. It appears to work, but I get a crash down the road. I get…
1
vote
0 answers

Embedding 32bit version of mono when running on 64bit Linux

I'm currently porting a C# plugin from Windows to Linux. On Windows the plugin is loaded using a DllExport nuget package, on Linux I'm looking to use Mono embedding. The program that will use my plugin only has 32bit builds, so I would need to embed…
1
2 3