如何让IKVM在Visual Studio 2008中构建? [英] How to get IKVM to build in Visual Studio 2008?

查看:318
本文介绍了如何让IKVM在Visual Studio 2008中构建?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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



现在我试图让它在Visual Studio 2008中构建和卡住。有没有人知道如何建立这个东西的文档,或者甚至可以给我指针?



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



因为你可能猜到我不是Visual Studio专家,而是用于在Eclipse中使用Java。



再次,我正在寻找:分步说明或链接到文档如何在Visual Studio中构建IKVM。



如果您需要更多信息,请与我们联系。感谢任何帮助!



编辑:我也试过手动的MsBuild.exe IKVM8.sln of:

  JniInterface.cs(30,12):error CS0234:类型或命名空间名称Internal不存在命名空间'IKVM'(一个
缺少一个程序集引用?)
JniInterface.cs(175,38):错误CS0246:无法找到类型或命名空间名称'ClassLoaderWrapper' mi
使用指令或程序集引用?)
JniInterface.cs(175,13):错误CS0246:无法找到类型或命名空间名称'ClassLoaderWrapper'(您是mi
:我注意到一个ikvm.build文件,所以我下载并运行nant的文件夹,这让我更进一步。一些事情开始成功,不幸的是我现在得到以下错误:



ikvm-native-win32:

  [mkdir]创建目录'C:\Documents和Settings \ ... \ My Documents \ikvm\ikvm\\\
ative\Release'。
[cl]将2个文件编译为C:\Documents和Settings \ ... \My Documents \ikvm\ikvm\\\
ative\Release。
BUILD FAILED
C:\Documents和Settings \ ... \My Documents \ikvm\ikvm\\\
ative\ native.build(17,10):
'cl'无法启动。
系统找不到指定的文件
总时间:0.2秒。

编辑#3 :OK解决了, > cl.exe ,但仍然得到其他错误。 请注意,这一切都是在控制台上进行的。与南特。有没有办法让它在Visual Studio中构建?这将很难过...



编辑#4 :下一步是安装GNU classpath 0.95,现在看起来像我需要一个特定的OpenJDK安装... Linux AMD64?!

  [exec] javac: ..\..\openjdk6-b12\control\build\linux-amd64\gensrc\com\sun\accessibility\internal\resources\accessibility.java 
[ exec]用法:javac< options> <源文件>
[exec]使用-help获取可能的选项列表

5 :作者的回答。请参阅下文或 http://weblog.ikvm。 net / CommentView.aspx?guid = 7e91b51d-6f84-4485-b61f-ea9e068a5fcf 让我们看看它是否工作...



编辑#6 我担心,下一个问题:无法打开windows.h,请参阅单独的问题此处



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

解决方案

获得了作者的以下回复: http:// weblog.ikvm.net/CommentView.aspx?guid=7e91b51d-6f84-4485-b61f-ea9e068a5fcf


如果您想从cvs构建,你是你自己。



如果您下载ikvm-0.36.0.11.zip,classpath-0.95-stripped.zip和openjdk-b13-stripped.zip从SourceForge(最后两个是在ikvm 0.36.0.5版本下)你有所有需要的来源。



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



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



尊敬的,
Jeroen


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


I've downloaded the IKVM sources (http://www.ikvm.net/) from http://sourceforge.net/cvs/?group_id=69637

Now I'm trying to get it to build in Visual Studio 2008 and am stuck. Does anyone know of documentation of how to build the thing, or could even give me pointers?

I've tried opening the ikvm8.sln, which opens all the projects, but trying to build the solution leads to a bunch of "type or namespace could not be found" errors.

As you can probably guess I'm no Visual Studio expert, but rather am used to working with Java in Eclipse.

So again, I'm looking for either: step-by-step instructions or a link to documentation on how to build IKVM in Visual Studio.

Let me know if you need any more info. Thanks for any help!

Edit: I've also tried a manual "MsBuild.exe IKVM8.sln", but also get a bunch of:

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?)

Edit #2: I noticed a "ikvm.build" file so I downloaded and ran nant on the folder, which got me a step further. A few things start to build successfully, unfortunately I now get the following error:

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.

Edit #3: OK solved that by putting cl.exe in the path, still getting other errors though. Note this is all for building it on the console e.g. with Nant. Is there no way to get it to build in Visual Studio? That would be sad...

Edit #4: Next step was installing GNU classpath 0.95, and now it looks like I need a specific OpenJDK installation... 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: Got an answer from the author. See below or at http://weblog.ikvm.net/CommentView.aspx?guid=7e91b51d-6f84-4485-b61f-ea9e068a5fcf Let's see if it works...

Edit #6 As I feared, next problem: "cannot open windows.h", see separate question here.

Final Edit: Found Solution! After getting the Platform SDK folders in the Lib and Path environment variables, the solution I described below worked for me.

解决方案

OK just got the following reply from the author: 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

Edit: After making sure the Platform SDK folders were in the Path and Lib environment variables, this worked for me. Thanks, Jeroen!

这篇关于如何让IKVM在Visual Studio 2008中构建?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆