Implicit Declaration of Function 'Create_Proc_Entry'

error: implicit declaration of function ‘create_proc_entry’

create_proc_entry has been removed since 3.10 kernel version. Alternative is to use proc_create. See that question for more info.

error: implicit declaration of function 'create_proc_read_entry' [-Werror=implicit-function-declaration]

The error is because you are not including explicitly the header that declares the function and the compiler is 'including' implicitily for you and this throws a warning. The flag '-Werror' is making the compiler treats the warning as an error. Try adding: #include <linux/proc_fs.h>

Also: create_proc_read_entry is a deprecated function.

Take a look at: https://lkml.org/lkml/2013/4/11/215

Getting error: implicit declaration of function 'proc_create'

You also need to include <linux/proc_fs.h>

error: implicit declaration of function 'rdtscl' [-Werror=implicit-function-declaration] (but no error when running on older kernel version)

The website elixir.bootlin.com is pretty useful for these things. The following link is a search across the entire kernel sources tree for version 3.10.108 for the symbol rdtscl.

https://elixir.bootlin.com/linux/v3.10.108/ident/rdtscl

rdtscl is only defined as a macro, so looks like the macro is not defined where you are getting your error about implicit declaration of rdtscl.

The two places where rdtscl is defined as a macro are:
https://elixir.bootlin.com/linux/v3.10.108/source/arch/x86/include/asm/msr.h#L182
https://elixir.bootlin.com/linux/v3.10.108/source/arch/x86/include/asm/paravirt.h#L182

So the fix is to include the correct headers files if you are building for x86 (the headers defining those macros are in arch/x86), or replace the call to rdtscl with something else.

Creating proc entry under parent folder

Did you include the header file contain PDE declaration?



Related Topics



Leave a reply



Submit