c编程(linux)

来源:互联网 发布:手机淘宝联盟怎么赚钱 编辑:程序博客网 时间:2024/06/03 16:41
1. function declaration isn't a prototype
error: static void print_dcache_info(); 
normal:static void print_dcache_info(void); 
In C int foo() and int foo(void) are different functions. int foo() accepts an arbitrary number of arguments, while int foo(void) accepts 0 arguments. In C++ they mean the same thing. I suggest that you use void consistently when you mean no arguments.

来源: <http://stackoverflow.com/questions/42125/function-declaration-isnt-a-prototype>


2.解决undefined reference to `__aeabi_uidivmod'

编译 linux driver出现这个问题,后来反复实验发现,与64位除法有关;

嵌入式内核只支持32运算,对于64位运算除法要用divu64

#include <linux/math64.h>

0 0
原创粉丝点击