【问题标题】:How to get IKVM to build in Visual Studio 2008?如何让 IKVM 在 Visual Studio 2008 中构建?
【发布时间】:2010-09-09 10:52:43
【问题描述】:

我已经从 http://sourceforge.net/cvs/?group_id=69637 下载了 IKVM 源 (http://www.ikvm.net/)

现在我正试图让它在 Visual Studio 2008 中构建并被卡住。有谁知道如何构建这个东西的文档,或者甚至可以给我指点?

我尝试打开 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.build”文件,所以我下载并在该文件夹上运行了 nant,这让我更进一步。一些东西开始成功构建,不幸的是我现在收到以下错误:

ikvm-native-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:OK 通过将cl.exe 放入路径中解决了这个问题,但仍然出现其他错误。 请注意,这一切都是为了在控制台上构建它,例如与南特。有没有办法让它在 Visual Studio 中构建?那会很难过...

编辑 #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

Edit #5:得到了作者的回答。见下文或http://weblog.ikvm.net/CommentView.aspx?guid=7e91b51d-6f84-4485-b61f-ea9e068a5fcf 让我们看看它是否有效......

编辑 #6 正如我所担心的,下一个问题:“无法打开 windows.h”,请参阅单独的问题 here

最终编辑:找到解决方案!在 Lib 和 Path 环境变量中获取 Platform SDK 文件夹后,我在下面描述的解决方案对我有用。

【问题讨论】:

    标签: c# visual-studio-2008 compiler-errors ikvm


    【解决方案1】:

    我不知道这对你有用,但你可以尝试从命令行构建吗?

    msbuild ________

    由于同样的问题,我认为这就是我构建应用程序的方式。

    【讨论】:

      【解决方案2】:

      好的,刚刚收到作者回复如下:http://weblog.ikvm.net/CommentView.aspx?guid=7e91b51d-6f84-4485-b61f-ea9e068a5fcf

      如果你想从 cvs 构建,你只能靠你自己。但是,如果您使用官方版本,则可以更轻松地从源代码构建。

      如果您从 SourceForge 下载 ikvm-0.36.0.11.zip、classpath-0.95-stripped.zip 和 openjdk-b13-stripped.zip(最后两个在 ikvm 0.36.0.5 版本下),您将拥有需要。

      现在您必须打开 Visual Studio 2008 命令提示符(即路径中有 cl.exe 和 peverify 的命令提示符)。

      然后在 ikvm 根目录中,执行“nant clean”,然后执行“nant”。那应该构建整个项目。完成后,您应该能够在 Visual Studio 中构建(仅限调试目标),但您可能需要修复项目中的程序集引用(除非您在 c:\ikvm 中安装了 ikvm)。

      问候, 杰伦

      编辑:确保 Platform SDK 文件夹位于 Path 和 Lib 环境变量中后,这对我有用。谢谢,杰伦!

      【讨论】:

        【解决方案3】:

        这就是我从源代码构建 IKVM 8.1.5717.0 的方式。不需要 Visual Studio。

        【讨论】:

          猜你喜欢
          • 2013-09-07
          • 2011-05-25
          • 1970-01-01
          • 1970-01-01
          • 2013-02-05
          • 1970-01-01
          • 2010-10-09
          • 1970-01-01
          • 1970-01-01
          相关资源
          最近更新 更多