我已经从http://sourceforge.net/cvs/?group_id=69637下载了IKVM的源代码(http://sourceforge.net/cvs/?group_id=69637)
现在,我正试图让它在2008中构建,现在我陷入了困境。有没有人知道如何构建这个东西的文档,或者甚至可以给我指点?
我尝试过打开ikvm8.sln,它会打开所有的项目,但是试图构建解决方案会导致一堆“类型或名称空间找不到”错误。
您可能会猜到,我不是Visual专家,而是习惯于在Eclipse中使用Java。
因此,我再次寻找任何一个:一步一步的说明,或者链接到如何在Visual中构建IKVM的文档。
如果你需要更多的信息,请告诉我。谢谢你的帮助!
编辑:--我也试过了一本手册"MsBuild.exe IKVM8.sln",但也得到了一堆:
JniInterface.cs(30,12): error CS0234: The type or namespace name 'Internal' does not exist in the namespace 'IKVM' (a
re you missing an assembly reference?)
JniInterface.cs(175,38): error CS0246: The type or namespace name 'ClassLoaderWrapper' could not be found (are you mi
ssing a using directive or an assembly reference?)
JniInterface.cs(175,13): error CS0246: The type or namespace name 'ClassLoaderWrapper' could not be found (are you mi
ssing a using directive or an assembly reference?)编辑#2:我注意到了一个"ikvm.build“文件,所以我下载并在文件夹上运行nant,这使我更进一步。有几件事情开始成功构建,不幸的是,我现在遇到了以下错误:
ikvm-原生-win32 32:
[mkdir] Creating directory 'C:\Documents and Settings\...\My Documents\ikvm\ikvm\native\Release'.
[cl] Compiling 2 files to 'C:\Documents and Settings\...\My Documents\ikvm\ikvm\native\Release'.
BUILD FAILED
C:\Documents and Settings\...\My Documents\ikvm\ikvm\native\native.build(17,10):
'cl' failed to start.
The system cannot find the file specified
Total time: 0.2 seconds.编辑#3:OK通过将cl.exe放在路径中解决了这个问题,但是仍然会出现其他错误。注意:这都是为了在控制台上构建它,例如使用Nant。有没有办法让它在中生成?那将是可悲的.
编辑#4:下一步是安装GNU 0.95,现在看起来我需要一个特定的OpenJDK安装.Linux AMD64?!
[exec] javac: file not found: ..\..\openjdk6-b12\control\build\linux-amd64\gensrc\com\sun\accessibility\internal\resources\accessibility.java
[exec] Usage: javac <options> <source files>
[exec] use -help for a list of possible options编辑#5:从作者那里得到了答案。看看下面或在http://weblog.ikvm.net/CommentView.aspx?guid=7e91b51d-6f84-4485-b61f-ea9e068a5fcf,让我们看看它是否有效..。
正如我担心的那样,编辑#6,下一个问题:“无法打开windows.h",请参阅单独的问题here。
最终编辑:找到解决方案!在Lib和Path环境变量中获得Platform文件夹后,下面描述的解决方案对我有效。
发布于 2008-09-17 06:15:32
OK刚从作者那里得到以下答复:http://weblog.ikvm.net/CommentView.aspx?guid=7e91b51d-6f84-4485-b61f-ea9e068a5fcf
如果您想要从cvs构建,您就只能靠自己了。但是,如果使用正式版本,则可以更容易地从源代码构建。
如果您从SourceForge下载ikvm-0.36.0.11.zip、类路径-0.95-stripped.zip和openjdk-b13-stripped.zip (最后两个版本在ikvm0.36.0.5发行版下),那么您就有了所需的所有源代码。
现在,您必须打开VisualStudio2008Command提示符(即路径中有cl.exe和peverify的命令提示符)。
然后,在ikvm根目录中,执行"nant清除“和"nant”。这应该是整个项目的基础。完成之后,您应该能够在Visual中构建(仅调试目标),但是您可能需要修复项目中的程序集引用(除非您在c:\ ikvm中安装了ikvm)。
你好,耶伦
编辑:在确保Platform文件夹在Path和Lib环境变量中之后,这对我起了作用。谢了耶伦!
发布于 2008-09-16 12:33:50
我不知道这样做对你有帮助,但你能试着从命令行构建吗?
msbuild ________
由于同样的问题,我认为这就是我构建应用程序的方式。
发布于 2017-05-12 13:37:36
这就是我是如何从源代码构建IKVM 8.1.5717.0的。不需要Visual。
中
https://stackoverflow.com/questions/71599
复制相似问题