如何让IKVM在Visual Studio 2008中构建?

问题描述:

我从http://sourceforge.net/cvs/?group_id=69637如何让IKVM在Visual Studio 2008中构建?

现在我想要得到它建立在Visual Studio 2008和我坚持下载的IKVM源(http://www.ikvm.net/)。有谁知道如何构建这个东西的文档,或者甚至可以给我指针?

我试过打开ikvm8.sln,它打开所有的项目,但试图构建解决方案导致一堆“类型或命名空间找不到”错误。

正如您大概猜测我不是Visual Studio专家,而是习惯于在Eclipse中使用Java。

因此,我正在寻找:分步说明或指向如何在Visual Studio中构建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。建立“文件,所以我下载并在文件夹上运行,这让我更进一步。有几件事情就成功构建,不幸的是我现在得到以下错误:

IKVM,本机的win32:

  [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:好解决,通过加入cl.exe路径,仍尽管获得其他错误。 请注意,这全部用于在控制台上构建,例如与南特。有没有办法让它在Visual Studio中生成?这将是悲伤...

编辑#4:下一步是安装GNU的classpath 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 SDK文件夹后,下面介绍的解决方案适用于我。

OK刚刚从笔者的答复如下:http://weblog.ikvm.net/CommentView.aspx?guid=7e91b51d-6f84-4485-b61f-ea9e068a5fcf

If you want to build from cvs, you're on your own. However, you can more easily build from source if you use an official release.

If you download ikvm-0.36.0.11.zip, classpath-0.95-stripped.zip and openjdk-b13-stripped.zip from SourceForge (the last two are under the ikvm 0.36.0.5 release) you have all the sources that are needed.

Now you'll have to open a Visual Studio 2008 Command Prompt (i.e. one that has cl.exe and peverify in the path).

Then in the ikvm root directory, do a "nant clean" followed by "nant". That should build the whole project. After you done that, you should be able to build in Visual Studio (debug target only), but you may need to repair the assembly references in the projects (unless you have ikvm installed in c:\ikvm).

Regards, Jeroen

编辑:确保平台SDK文件夹是在路径和LIB环境变量之后,这个工作对我来说。谢谢,Jeroen!

我不知道这会为你做,但你可以尝试从命令行构建?

的MSBuild ________

我想这就是我如何构建的应用程序,由于同样的问题。

+0

感谢,看到发生了什么编辑注... – Epaga 2008-09-16 13:00:26

这是我如何从源代码构建IKVM 8.1.5717.0。 Visual Studio不是必需的。