在 64 位操作系统中构建 odcctools

发布于 2024-09-05 03:13:05 字数 493 浏览 1 评论 0原文

odcctools 软件包为 Darwin 操作系统提供 binutils。 -- 例如,这允许您交叉编译到 Darwin 和 OSX。但是,odcctools 似乎无法在 64 位操作系统上正确构建:

./../expr.c: In function ‘expression’:
./../expr.c:311: error: ‘union <anonymous>’ has no member named ‘n_name’

或者,如果将 CFLAGS 设置为 -m32,您会得到:

/usr/bin/ld: skipping incompatible ../libstuff/libstuff.a when searching for -lstuff
/usr/bin/ld: cannot find -lstuff

How do you build this on a 64-bit OS?

The odcctools package provides binutils for the Darwin OS. -- this allows you to cross compile to Darwin and OSX for example. However, odcctools does not seem to build properly on 64-bit OSes:

./../expr.c: In function ‘expression’:
./../expr.c:311: error: ‘union <anonymous>’ has no member named ‘n_name’

Or, if you set CFLAGS to -m32, you get this:

/usr/bin/ld: skipping incompatible ../libstuff/libstuff.a when searching for -lstuff
/usr/bin/ld: cannot find -lstuff

How do you build this on a 64-bit OS?

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

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

发布评论

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

评论(1

深巷少女 2024-09-12 03:13:06

odcctools makeflags 的设置方式是,您不能使用 CFLAGS —— 您必须同时设置 CC CXX:

CC="gcc -m32" CXX="g++ -m32" ./configure blah blah blah

请注意,我必须添加一个 -fpermissive 来我的 CXX 让它运行,但这可能没有必要!

另外,您可能对这篇文章感兴趣(尽管这对于我的设置来说还不够)。

(如果有人有更好的方法,请告诉我!)

The way the odcctools makeflags are set up, you can't use CFLAGS -- you have to set both CC and CXX:

CC="gcc -m32" CXX="g++ -m32" ./configure blah blah blah

Note that I had to add a -fpermissive to my CXX to get it to run but this may not be necessary!

Also, you may be interested in this post (although it wasn't sufficient for my setup).

(If anyone has a better way to do this please let me know!)

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