主题 : LCD屏显示指针时钟 复制链接 | 浏览器收藏 | 打印
级别: 新手上路
UID: 25643
精华: 0
发帖: 7
金钱: 55 两
威望: 11 点
综合积分: 14 分
注册时间: 2010-07-27
最后登录: 2017-09-13
楼主  发表于: 2010-09-07 14:40

 LCD屏显示指针时钟

现在大屏幕的LED显示屏越来越大,很多屏幕上都有一个指针式的时钟,做的很漂亮,在我没有接触framebuffer之前总是在琢磨这个到底是怎么做出来的,总是觉得很先进。这两天接触了framebuffer应用编程,恍然大悟,所以自己动手变写了一个时钟,经过一天的调试终于可以用了。
现在它与大家分享。
附件: fbtest.zip (3 K) 下载次数:85
级别: 新手上路
UID: 1916
精华: 0
发帖: 40
金钱: 205 两
威望: 41 点
综合积分: 80 分
注册时间: 2008-10-11
最后登录: 2012-03-31
1楼  发表于: 2010-09-14 23:37
app_clock.o: In function `drawcrict':
app_clock.c:(.text+0xd0): undefined reference to `cos'
app_clock.c:(.text+0x124): undefined reference to `sin'
app_clock.o: In function `drawline':
app_clock.c:(.text+0x488): undefined reference to `sqrt'
app_clock.c:(.text+0x50c): undefined reference to `atan'
app_clock.c:(.text+0x534): undefined reference to `cos'
app_clock.c:(.text+0x588): undefined reference to `sin'
app_clock.o: In function `drawDial':
app_clock.c:(.text+0x820): undefined reference to `cos'
app_clock.c:(.text+0x874): undefined reference to `sin'
app_clock.c:(.text+0x8c8): undefined reference to `cos'
app_clock.c:(.text+0x91c): undefined reference to `sin'
app_clock.o: In function `displaySec':
app_clock.c:(.text+0xae8): undefined reference to `cos'
app_clock.c:(.text+0xb3c): undefined reference to `sin'
app_clock.c:(.text+0xc14): undefined reference to `cos'
app_clock.c:(.text+0xc68): undefined reference to `sin'
app_clock.o: In function `displayMin':
app_clock.c:(.text+0xd9c): undefined reference to `cos'
app_clock.c:(.text+0xdf0): undefined reference to `sin'
app_clock.c:(.text+0xec8): undefined reference to `cos'
app_clock.c:(.text+0xf1c): undefined reference to `sin'
app_clock.o: In function `displayHour':
app_clock.c:(.text+0x1054): undefined reference to `cos'
app_clock.c:(.text+0x10a8): undefined reference to `sin'
app_clock.c:(.text+0x1180): undefined reference to `cos'
app_clock.c:(.text+0x11d4): undefined reference to `sin'
collect2: ld returned 1 exit status
make: *** [clock] Error 1


请问怎么解决 或者传个带bin的文件上来试试啊
级别: 新手上路
UID: 1916
精华: 0
发帖: 40
金钱: 205 两
威望: 41 点
综合积分: 80 分
注册时间: 2008-10-11
最后登录: 2012-03-31
2楼  发表于: 2010-09-15 10:28
解决了 编译时加 -lm