[Mono-list] ICodeCompiler.CompileAssemblyFromSourceBatch failure

Carl Cerecke carl.cerecke at telogis.com
Wed Jun 18 16:50:28 EDT 2008


Thanks Robert! All working now.

I had to include mono-config.h like this:

extern "C" {
#include <mono/metadata/mono-config.h>
}

Cheers,
Carl.

On Wed, Jun 18, 2008 at 7:48 PM, Robert Jordan <robertj at gmx.net> wrote:
> Carl Cerecke wrote:
>> Hi,
>>
>> I have an unusual failure when calling
>> ICodeCompiler.CompileAssemblyFromSourceBatch. The compile works
>> correctly when called from a mono .exe, but does not when the same
>> .exe is called via the mono embedded calls.
>>
>> This works on the command-line:
>>> mono mtest.exe
>>
>> This code (using mono embedded libs) fails (never gets to printf):
>> int main(int argc, char *argv[]) {
>>
>>     domain = mono_jit_init("mtest.exe");
>
> You must call this after mono_jit_init ():
>
> mono_config_parse (NULL);
>
>>     assembly = mono_domain_assembly_open (domain, "mtest.exe");
>>     mono_jit_exec(domain, assembly, argc, argv);
>>     printf("Ran mtest.exe\n");
>>
>
> Robert
>
> _______________________________________________
> Mono-list maillist  -  Mono-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-list
>



-- 
Carl Cerecke, PhD
Senior Software Engineer

Telogis, Intelligent Location Technology
Level 2, Building 2
1 Show Place
Addington
CHRISTCHURCH
New Zealand

Phone: +64 03 339 2825 ext 208
Fax: +64 03 339 4537
Email: carl.cerecke at telogis.com

This message (including any attachments) contains confidential
information intended for a specific individual and purpose, and is
protected by law.  If you are not the intended recipient, you should
delete this message and are hereby notified that any disclosure,
copying, or distribution of this message, or the taking of any action
based on it, is strictly prohibited.


More information about the Mono-list mailing list