Convert Scala-Files into a Dll

2019-06-23 10:59发布

问题:

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#!



标签: scala dll ikvm