如何与 libquadmath 链接?

发布于 2024-12-19 20:02:31 字数 339 浏览 3 评论 0原文

当我尝试使用 gfortran 4.6 构建应用程序时,出现以下错误:

profcn103.for:(.text+0x7e76b): undefined reference to log10q_

我尝试指定 -lquadmath 选项没有帮助。

当我通过 nm 查看库时,我得到以下信息:

log10q.o: 00000000 T log10q

我使用 Ubuntu 10.10 (i686)。我尝试从 ppa 存储库手动编译 gcc-4.6.2 和 gcc-4.6。

看起来像是名称混乱的问题。我能用它做什么?

When I try to build my application by gfortran 4.6 I get the following error:

profcn103.for:(.text+0x7e76b): undefined reference to log10q_

I tried to specify -lquadmath option it didn't help.

When I look at library by nm I get the following:

log10q.o: 00000000 T log10q

I use Ubuntu 10.10 (i686). I tried manually compiled gcc-4.6.2 and gcc-4.6 from ppa repository.

It looks like a problem with mangling of names. What can I do with it?

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

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

发布评论

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

评论(2

羁绊已千年 2024-12-26 20:02:31

您从什么平台获得 gfortran 副本?如果您使用 Windows,equation.com 的构建在四边形数学方面会被破坏。否则,它应该有效。

不,您不需要显式添加 -lquadmath; gfortran 驱动程序会自动执行此操作。

What platform, and where did you get your copy of gfortran? In case you use windows, the equation.com builds are known to be broken wrt quadmath. Otherwise, it should work.

And no, you don't need to explicitly add -lquadmath; the gfortran driver does it automatically.

冬天旳寂寞 2024-12-26 20:02:31

这是我的错。我必须使用通常的 log10 而不是 log10q 因为 gfortran 会自动调用所需的函数。

It's my fault. I had to use usual log10 and not log10q because gfortran automatically invoke needed functions.

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