[mercury-users] MSIL backend : missing mercury.runtime ?
Pavel Zolnikov
ctrlelk at usexpress.net
Sun Mar 25 10:05:06 AEST 2001
Greetins !
I am still having issues with MSIL backend.(Yes, I have built library with ilc grade;)
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. To force mercury runtime initialization I am calling static method of library class - so its static constructor is triggerd.
string v = "";
mercury.library.version_1_p_0( ref v );
Execution of this code throws exception:
System.TypeLoadException: Could not load class 'private_builtin__c_code'.
at mercury.library.version_1_p_0(String& Version_1)
at My.MyForm..ctor()
My analys of library il code showes that library::.ctor calls similar static constructors of other modules. Some of them are trying to access fields in private_builtin__c_code class(e.g. 'MR_TYPECTOR_REP_EQUIV' field).
Any clues ?
With best regards,
Pavel Zolnikov.
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.
P.P.S. What intrigued me is why hello.exe fails unable to load 'assoc_list' while my test project goes slightly further. ILDASM showed me that the test project metadata referes to library modules using .file. After I have copied this referencies into hello.il I managed to receive the same exception form hello.exe - could not load 'private_builtin__c_code'.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurylang.org/archives/users/attachments/20010324/b458103d/attachment.html>
More information about the users
mailing list