Convert Scala-Files into a Dll

时光毁灭记忆、已成空白 提交于 2019-12-10 14:35:51

问题


I have some scala code I've written using IntelliJ with the SBT-Plugin and want to provide me code as an DLL for C++.

I already tried to use 'ikvmc': I packed all my classes via 'package' in one jar. Afterwards I manually set up one jar which contains all the dependencies I use (scala-library,scama,jamtio,jama). Unfortunately i obtain a lot of warnings:'IKVMC0119', "Emitted java.lang.VerificationError' and 'IKVMC0104' (analogously to the example below)!

Then i tried to convert a simple scala-class (no dependencies) using the method described above : package with sbt, add the scala-library.jar and try to convert it via ikvmc -target:library simpleClass.jar . I obtain the same warnings/errors as you see below...

I would be very happy if someone could give me a step-by-step explanation how to provide my Scala-code as an DLL.

Thanks a lot in advance!


回答1:


Which IKVM version do you use?

If you already use 7.1 then it sounds like a bug in IKVM. Contact the mailing list or the bug list with a sample for reproduction.

If you use an older version then you should update.




回答2:


After converting the hello.jar with the previous version of IKVM ('7.0.4335.0') i could use the dll in c# (even though i obtained warning from ikvmc). It also worked for my Scala code: converting the sbt-packaged jar with its dependencies delivered a dll. Afterwards i could use the classes in c#!



来源:https://stackoverflow.com/questions/13701314/convert-scala-files-into-a-dll

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!