如何与 libquadmath 链接?
当我尝试使用 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 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您从什么平台获得 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.
这是我的错。我必须使用通常的
log10
而不是log10q
因为 gfortran 会自动调用所需的函数。It's my fault. I had to use usual
log10
and notlog10q
because gfortran automatically invoke needed functions.