一、前期准备:
1、java的JRE,并设置了相应的环境变量;
2、安装了ant工具,unzip和zip工具。
二、描述:
我通过用eclipse IDE 3.1.2版本的cvs工具下载了CDT的源代码(版本应该是最新的啦),但是,用ant运行的时候却出现以下问题:
Buildfile: D:/eclipse/workspace/org.eclipse.cdt-releng/org.eclipse.cdt.releng/build.xml
init:
unzip:
unpack:
unpackzip:
[unzip] Expanding: D:/eclipse/workspace/org.eclipse.cdt-releng/org.eclipse.cdt.releng/eclipseDist undefined.zip into D:/eclipse/workspace/org.eclipse.cdt-releng/org.eclipse.cdt.releng/results
BUILD FAILED
D:/eclipse/workspace/org.eclipse.cdt-releng/org.eclipse.cdt.releng/build.xml:83: The following error occurred while executing this line:
D:/eclipse/workspace/org.eclipse.cdt-releng/org.eclipse.cdt.releng/build.xml:132: The following error occurred while executing this line:
D:/eclipse/workspace/org.eclipse.cdt-releng/org.eclipse.cdt.releng/build.xml:123: Error while expanding D:/eclipse/workspace/org.eclipse.cdt-releng/org.eclipse.cdt.releng/eclipseDist undefined.zip
Total time: 890 milliseconds
当我讲build.xml中123行代码注释后,如下
<target name="unpackzip" if="onWindows">
<!--unzip src="${srcPrefix}.zip" dest="${dest}"/-->
</target>
重新编译后却又发现出现以下错误:
Buildfile: D:/eclipse/workspace/org.eclipse.cdt-releng/org.eclipse.cdt.releng/build.xml
init:
unzip:
unpack:
unpackzip:
unpacktar:
zips:
BUILD FAILED
D:/eclipse/workspace/org.eclipse.cdt-releng/org.eclipse.cdt.releng/build.xml:90: Basedir D:/eclipse/workspace/org.eclipse.cdt-releng/org.eclipse.cdt.releng/${eclipse.home}/plugins/org.eclipse.pde.build/scripts does not exist
Total time: 672 milliseconds
这个错误我最不能够理解的,因为
eclipse.home=D:/eclipse就是我的eclipse的安装目录,而
${eclipse.home}/plugins/org.eclipse.pde.build/scripts
这个文件又是存在的。这和Basedir没有关系哈,为什么错误提示中却出现Basedir D:/eclipse/workspace/org.eclipse.cdt-releng/org.eclipse.cdt.releng/如此错误哈。
另外,通过命令行方式和将CDT源代码拷贝到linux下编译得到的错误类似。
敬请各位大侠指教,到底怎么样才能够编译CDT的源代码呢。