[mercury-users] MSIL backend : missing mercury.runtime ?

Fergus Henderson fjh at cs.mu.OZ.AU
Thu Mar 29 14:03:16 AEST 2001


On 24-Mar-2001, Pavel Zolnikov <ctrlelk at usexpress.net> wrote:
> Greetins !
> I am still having issues with MSIL backend.(Yes, I have built library with ilc grade;)

Hmm, it looks like you haven't built all of it.
(Either that, or if you have then perhaps some parts of it are not being
included in the path defined in the .cfg file, but I think the former
explanation is more likely.)

> In order to understand why my hello.exe failes, I have created test project on c# in Visual Studio. Then I added references to all dll files from mercury/library folder to this project.

You should only need to add references to the mercury.dll assembly,
I believe.

...
> System.TypeLoadException: Could not load class 'private_builtin__c_code'.

The `private_builtin__c_code' class is supposed to be defined
in the C++ file private_builtin__c_code.cpp that gets generated
when you compile library/private_builtin.m with `--il'.
private_builtin__c_code.cpp needs to be compiled with MSVC++.

In release 0.10, I think all of these things are supposed to be built
automatically and included in the `mercury' assembly which is defined
in mercury.dll when you do `MMAKE_DIR=../scripts mmake GRADE=ilc'
in the library directory.

See library/Mmakefile:

	# al is the assembly linker, it will create an assembly that references
	# all the modules (.dll files) in the library and runtime.
	mercury.dll: $(ALL_DLLS)
		$(MS_AL) -out:mercury.dll $(ALL_DLLS)

Do you have `mercury.dll'?
How about `private_builtin__c_code.dll' and `private_builtin__c_code.cpp'?

> P.S. While building test project I am getting this output form c# compiler :
> 
> The sub-dependency 'mercury.io' could not be found.
> 
> The sub-dependency 'mercury' could not be found.

> I think this is beause all modules in library has .assembly extern 'mercury' { }. My understandding is that one module should have this directive without extern. 

No, the assembly is supposed to be created (in mercury.dll) by al.exe.

I think the error messages here are consistent with you not having
mercury.dll or not telling the C# compiler to link it in.

-- 
Fergus Henderson <fjh at cs.mu.oz.au>  |  "I have always known that the pursuit
                                    |  of excellence is a lethal habit"
WWW: <http://www.cs.mu.oz.au/~fjh>  |     -- the last words of T. S. Garp.
--------------------------------------------------------------------------
mercury-users mailing list
post:  mercury-users at cs.mu.oz.au
administrative address: owner-mercury-users at cs.mu.oz.au
unsubscribe: Address: mercury-users-request at cs.mu.oz.au Message: unsubscribe
subscribe:   Address: mercury-users-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------



More information about the users mailing list