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 <[EMAIL PROTECTED]> 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  -  [email protected]
> 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: [EMAIL PROTECTED]

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.
_______________________________________________
Mono-list maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-list

Reply via email to