gpt4 book ai didi

c - 在 C 中使用 exp101 和 log101 函数

转载 作者:行者123 更新时间:2023-12-02 21:47:17 24 4
gpt4 key购买 nike

我正在尝试使用函数 exp1 和 log101,它们依次将长 double 作为输入和输出长 double 。但是,当我尝试编译该文件时,我收到以下错误消息:

/tmp/ccIvBVbG.o: In function `main':
derivative.c:(.text+0x250): undefined reference to `log101'
collect2: ld returned 1 exit status

我已经包含了 math.h 库,并且还提供了 -lm 选项。解决这个问题的办法是什么?任何帮助和评论表示赞赏。

谢谢

附注编译器是 32 位 Ubuntu 12.04 LTS 上的 GCC

最佳答案

您尝试使用的函数名称是 exp10llog10l。名称中的最后一个字符是小写 L,不是另一个 1。

关于c - 在 C 中使用 exp101 和 log101 函数,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19307742/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com