makefile.am的问题

yueyinggufan 2009-04-25 12:34:34
我写了一个程序 里面要用到sqrt这个函数,我用autoconf和automake软件去生成MAKEFILE的,但是configure的时候,它显示
checking for sqrt... no 请问怎么解决,是不是在makefile.am里面加点东西,我试着在添加了CXXFLAGS = math.h的路径 但是也没用,man关于sqrt的解释,上面有link -lm 这句话,但是-lm加到哪里啊? 谢谢回答!!!
...全文
112 5 打赏 收藏 转发到动态 举报
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
yueyinggufan 2009-04-25
  • 打赏
  • 举报
回复
4楼的朋友,这个我知道 我说的是如果用automake和autoconf怎么加??
baiwei156 2009-04-25
  • 打赏
  • 举报
回复
link -lm
加到编译命令后
如 gcc ,g++后去
like:
g++ -DDEBUG -DSOLARIS -g -w -Wall -lsocket -lnsl -lm
yueyinggufan 2009-04-25
  • 打赏
  • 举报
回复
SQRT(3) Linux Programmer's Manual SQRT(3)

NAME
sqrt, sqrtf, sqrtl - square root function

SYNOPSIS
#include <math.h>

double sqrt(double x);
float sqrtf(float x);
long double sqrtl(long double x);

Link with -lm.

DESCRIPTION
The sqrt() function returns the non-negative square root of x. It
fails and sets errno to EDOM, if x is negative.

ERRORS
EDOM x is negative.

CONFORMING TO
SVr4, 4.3BSD, C89. The float and long double variants are C99 require- ments.

SEE ALSO
cbrt(3), csqrt(3), hypot(3)

COLOPHON
This page is part of release 3.01 of the Linux man-pages project. A
description of the project, and information about reporting bugs, can
be found at http://www.kernel.org/doc/man-pages/.

2002-07-27 SQRT(3)
fox000002 2009-04-25
  • 打赏
  • 举报
回复
可能是写错了吧

把文件贴出来看看
morris88 2009-04-25
  • 打赏
  • 举报
回复
例解 autoconf 和 automake 生成 Makefile 文件

http://www.ibm.com/developerworks/cn/linux/l-makefile/

23,125

社区成员

发帖
与我相关
我的任务
社区描述
Linux/Unix社区 应用程序开发区
社区管理员
  • 应用程序开发区社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧