GCC GCJ 需要 ECJ 和其他图书馆吗?

发布于 2024-10-31 18:46:11 字数 466 浏览 3 评论 0原文

所以我刚刚从 这里(显然是 GCC 4.7),发现它有一个最新版本的 GCJ 编译器。

我尝试使用它,但显然 gcj 需要 ecj1.exe,它是 Java 的 Eclipse 编译器...那么,我在哪里可以找到兼容版本的二进制文件需要 ECJ 和相关的 Java 库(libgcj 等)吗?

理想情况下,可以在 MinGW-w64 项目页面上找到它,但它似乎不存在。

(我已经尝试从稍旧的 GCC 版本复制它们;它不起作用。)

So I just downloaded mingw-w64-bin_i686-mingw_20110410.zip from here (GCC 4.7 apparently), and discovered it had a very recent version of the GCJ compiler.

I tried using it, but apparently gcj requires ecj1.exe, which is the Eclipse compiler for Java... so, where do I find a compatible version of the binaries of ECJ and the associated Java libraries that are needed (libgcj, etc.)?

Ideally this would be found on the MinGW-w64 project page, but it doesn't seem to exist.

(I've already tried copying them from a slightly older GCC version; it doesn't work.)

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

拥醉 2024-11-07 18:46:11

openSUSE 版本的 gcc 的原因基本上是这样的:
如果gcc编译的configure步骤没有找到ecj.jar
文件,刚构建的 gcj 时会丢失 ecj1,
被称为。
ecj.jar 可以取自 ftp://sourceware.org/pub/java/ecj- 4.8.jar
例如。

两个选项是:

i) 将 ecj.jar 放入 $HOME/share/java/ecj.jar,重新配置 gcc
./configure .... --with-ecj-jar=$HOME/java/ecj.jar
并重新编译gcc。未来使用该 gcc 的编译将不需要
ecj1 .

ii) 将 ecj.jar 放入 $HOME/share/java/ecj.jar 并创建 ecj1(.exe)
通过像这样的编译
gcj -o$HOME/bin/ecj1(.exe) --main=org.eclipse.jdt.internal.compiler.batch.GCCMain $HOME/share/java/ecj.jar
假设 $HOME/bin 位于后续调用 gcj 的 PATH 中。

这里实际上“损坏”的事情是 gcc 4.8.* 没有发布
默认情况下,ecj.jar 位于某个标准位置。

The cause for an openSUSE version of the gcc is basically this:
If the configure step of the compilation of gcc did not find the ecj.jar
file, ecj1 will be missing at the time when gcj, which has just been build,
is called.
ecj.jar can be taken from ftp://sourceware.org/pub/java/ecj-4.8.jar
for example.

The two options are:

i) Put ecj.jar in $HOME/share/java/ecj.jar, reconfigure gcc with
./configure .... --with-ecj-jar=$HOME/java/ecj.jar
and recompile gcc. Future compilations with that gcc will not require
ecj1 .

ii) Put ecj.jar in $HOME/share/java/ecj.jar and create ecj1(.exe)
through a compilation like
gcj -o$HOME/bin/ecj1(.exe) --main=org.eclipse.jdt.internal.compiler.batch.GCCMain $HOME/share/java/ecj.jar
assuming that the $HOME/bin is in the PATH for subsequent calls of gcj.

The thing that is actually "broken" here the fact that gcc 4.8.* is not shipped
by default with ecj.jar at some standard place.

月依秋水 2024-11-07 18:46:11

这是 MinGW-w64 工具链的一个非常旧的版本。

我建议下载我的一个版本,我有关于 gcj 工作的报告(没有 libgcj,它在 Windows 上不起作用),尽管我似乎找不到很久以前与用户进行的讨论的链接。用户的情况与创建 JNI 接口或其他东西有关,不需要 libgcj。

我的旧版本可以在 此处找到 32 位版本此处适用于 64 位< /a>.我检查了 4.8 版本,它包含 gcj 编译器。

That is a very old version of a MinGW-w64 toolchain.

I would suggest downloading one of my builds, I've had reports of gcj working (without libgcj, which does not work on Windows), although I can't seem to find a link to the discussion I had long ago with a user. The user's case had something to do with creating a JNI interface or something, which didn't require libgcj.

My old builds can be found here for 32-bit and here for 64-bit. I checked the 4.8 release build, and it contains the gcj compiler.

路弥 2024-11-07 18:46:11

您会反对下载源代码并构建它吗?我查看了 基本高级构建文档。我没有看到任何有关 GCJ 编译器或 ECJ 的内容,但您需要 gcc 4.5.1 才能构建它。

Would you be opposed to downloading the source and building it? I looked over the build doc in basic and advanced build docs. I didn't see anything about the GCJ compiler or ECJ, but you'll need gcc 4.5.1 in order to build it.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文