nmealib-0.5.3 问题 Build Error: undefined reference to `ceil'

When building on Ubuntu 12.x the build fails with the following error…

gcc samples/generate/main.o -lm -Llib -lnmea -o build/samples_generate
lib/libnmea.a(generate.o): In function `nmea_gsv_npack':
generate.c:(.text+0x700): undefined reference to `ceil'
collect2: ld returned 1 exit status
make: *** [samples_generate] Error 1

gcc  samples/generate/main.o -lm -Llib -lnmea -o build/samples_generate
lib/libnmea.a(generate.o): In function `nmea_gsv_npack':
generate.c:(.text+0x700): undefined reference to `ceil'
collect2: ld returned 1 exit status
make: *** [samples_generate] Error 1

This forum posting shows that the problem is a fairly widespread consequence of a change to the build tools on Ubuntu

A resolution on Ubuntu is to edit the makefile, replacing

LIBS = -lm -Llib -lnmea

    with

LIBS = -Llib -lnmea -lm

At line 14.

http://sourceforge.net/p/nmea/discussion/677597/thread/cd46c3b9

 

转载于:https://www.cnblogs.com/tianciliangen/p/3487589.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值