Reputation: 2463
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: http://github.com/mono/mono/blob/master/msvc/mono.def Note that this file says: LIBRARY mono-2.0.dll
When I run it, I get an error that the mono-2.0.dll can not be located.
I have mono-3.2.3 installed and I don't see a mono-2.0.dll anywhere.
I am kind of worried that the document states that mono-2.0 is for older versions and 'mono' should be used - but mono.dll also does not exist...
Upvotes: 2
Views: 2514
Reputation: 1
In your property manager in visual studio, just do a post build events to copy your dll to your executable folder. iirc the dll is in the etc folder for embed mono.
Upvotes: 0
Reputation: 2231
See this answer: Getting/compiling Mono-2.0.dll for embedding
The libraries that you are looking for may be found in the bin directory of the mono installation folder. Actually, after installing mono 3.2.3 there are two libraries in the MONO_INSTALLATION_PATH\bin\ directory: libmonoboehm-2.0.dll and libmonosgen-2.0.dll (you must choose either Boehm or SGen GC implementation)
(Links for Boehm
and SGen
now redirect to the same web page)
I have never used embedded Mono in Windows (I always use Linux) but perhaps changing in your .def
file to those library names your program will work.
For example, for Boehm you must download mono.def and edit it like this:
; file generated by create-windef.pl
LIBRARY libmonoboehm-2.0.dll
EXPORTS
For SGen, just download monosgen.def and edit it in this way:
; file generated by create-windef.pl
LIBRARY libmonosgen-2.0.dll
EXPORTS
Upvotes: 3