Gosmore 在 ubuntu 11.10 上编译错误

发布于 2024-12-22 23:56:16 字数 1084 浏览 0 评论 0原文

我想在ubuntu 11.10服务器上编译Gosmore。

我从以下位置获取源代码:

http://svn.openstreetmap.org/applications/rendering/gosmore/

当我尝试命令“make”命令时,我收到如下错误:

gcc -lm density.c -o density
/tmp/ccNQSatu.o: In function `main':
density.c:(.text+0x21f): undefined reference to `exp'
density.c:(.text+0x224): undefined reference to `atan'
density.c:(.text+0x2c3): undefined reference to `exp'
density.c:(.text+0x2c8): undefined reference to `atan'
density.c:(.text+0x5d3): undefined reference to `exp'
density.c:(.text+0x5d8): undefined reference to `atan'
density.c:(.text+0x67a): undefined reference to `exp'
density.c:(.text+0x67f): undefined reference to `atan'
density.c:(.text+0x723): undefined reference to `exp'
density.c:(.text+0x728): undefined reference to `atan'
density.c:(.text+0x793): undefined reference to `exp'
density.c:(.text+0x798): undefined reference to `atan'
collect2: ld returned 1 exit status
make: *** [jni/bboxes.c] Error 1

如何解决这个问题?

I want to compile Gosmore on ubuntu 11.10 server.

I got source code from :

http://svn.openstreetmap.org/applications/rendering/gosmore/

When i try command "make" command i got error like below:

gcc -lm density.c -o density
/tmp/ccNQSatu.o: In function `main':
density.c:(.text+0x21f): undefined reference to `exp'
density.c:(.text+0x224): undefined reference to `atan'
density.c:(.text+0x2c3): undefined reference to `exp'
density.c:(.text+0x2c8): undefined reference to `atan'
density.c:(.text+0x5d3): undefined reference to `exp'
density.c:(.text+0x5d8): undefined reference to `atan'
density.c:(.text+0x67a): undefined reference to `exp'
density.c:(.text+0x67f): undefined reference to `atan'
density.c:(.text+0x723): undefined reference to `exp'
density.c:(.text+0x728): undefined reference to `atan'
density.c:(.text+0x793): undefined reference to `exp'
density.c:(.text+0x798): undefined reference to `atan'
collect2: ld returned 1 exit status
make: *** [jni/bboxes.c] Error 1

how to solve this ?

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

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

发布评论

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

评论(1

疧_╮線 2024-12-29 23:56:16

exp,atan,这些位于数学库中,称为 libm.a ,您使用 -lm 链接到它,但顺序错误: gcc -lm Density.c -o Density 是错误的,GCC Density .c -lm -o 密度正确。

我可以使用最新版本的 gosmore 重现您的问题,这是我的 github 副本中的补丁。

https://github.com/h4ck3rm1k3/gosmore/commit/67bd8e2dd7e76de47a31b3c3df1ab33b8fda797b

不要忘记积极的反馈!
谢谢
麦克风

exp, atan, these are in the math lib, it is called libm.a , you link to it with -lm which you did to, but in the wrong order : gcc -lm density.c -o density is wrong, gcc density.c -lm -o density is correct.

I am able to reproduce your problem with the latest version of gosmore, here is a patch in my copy of github.

https://github.com/h4ck3rm1k3/gosmore/commit/67bd8e2dd7e76de47a31b3c3df1ab33b8fda797b

dont forget a positive feedback!
thanks
mike

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