Find the answer to your Linux question:
Results 1 to 4 of 4
Hi I am newbie to kernel programming. My kernel version is 2.6.27 i am getting compilation errors when compiling a module that error: implicit declaration of function ‘class_device_create’ error: implicit ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Dec 2008
    Posts
    2

    class_device_create compilation errors.


    Hi
    I am newbie to kernel programming. My kernel version is 2.6.27 i am getting compilation errors when compiling a module that
    error: implicit declaration of function ‘class_device_create’
    error: implicit declaration of function ‘class_device_destroy’
    while the module is compiled successfully in 2.6.24.I need to know a way of doing it in 2.6.27 what are the essential headers for it?.

  2. #2
    Linux Newbie
    Join Date
    Mar 2008
    Location
    Hyderabad
    Posts
    109
    At root of your kernel sources do
    #ctags -R * // It will take some time

    It will generate a tags file. Watch for class_device_create and class_device_destroy
    in that file. It is possible that in 2.6.27 these interfaces are no longer Exported so you are unable to compile the module.

    But in 2.6.24 these interfaces were imported with
    EXPORT_SYMBOL(class_device_create);
    EXPORT_SYMBOL(class_device_destory);
    macros respectively.

    Checks for header files too

  3. #3
    Just Joined!
    Join Date
    Dec 2008
    Posts
    2

    not able to compile

    Still not working.What headers should i include to make it work.

  4. #4
    Linux Newbie
    Join Date
    Mar 2008
    Location
    Hyderabad
    Posts
    109
    If the symbols are not exported u cann't access them. Look for alternative or modified/new interfaces which provide similar construct

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •