Find the answer to your Linux question:
Results 1 to 6 of 6
Hi all, I am compiling Android code on 2.6.28.2. I have my code something like follows. Code: #include<linux/input.h> #include<linux/uinput.h> #include<lsys/time.h> void func (foo) { struct uinput_user_dev uinp; ............................ ............................. } ...
  1. #1
    Just Joined!
    Join Date
    Oct 2009
    Location
    Cambridge, UK
    Posts
    15

    [SOLVED] Compilation error. Header missing

    Hi all,
    I am compiling Android code on 2.6.28.2. I have my code something like follows.

    Code:
    #include<linux/input.h>
    #include<linux/uinput.h>
    #include<lsys/time.h>
    
    void func (foo)
    {
    struct uinput_user_dev uinp;
    ............................
    .............................
    }
    But i get error
    HTML Code:
    error: linux/uinput.h: No such file or directory.
    error:storage size of 'uinp' is'nt known
    Does anybody know why I am getting the header missing error. I am confused, because it finds the header linux/input.h and misses linux/uinput.h which also is in the same folder. I checked in /usr/src/include/linux and have the header there.

    Any pointers are appreciated.

    Thanks,
    Tony

  2. #2
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, or in a galaxy far, far away.
    Posts
    8,974
    Is it possible that the "file" linux/uinput.h is not a (missing) link? Also, it may be that where you are looking is not where the compiler is looking. Check the -L options in your make file.
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

  3. #3
    Just Joined!
    Join Date
    Oct 2009
    Location
    Cambridge, UK
    Posts
    15
    Hello Rubberman,
    Thanks for the quick reply. Yes you are right. I wrote a simple program and compiled it. It is finding both linux/uinput.h and linux/input.h. Actually the problem I mentioned is when I compile Android. I think it might take a long time to find where they have mentioned the -L option.
    Thanks,
    Tony

  4. #4
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, or in a galaxy far, far away.
    Posts
    8,974
    When you compile android, it is a kernel build and the headers the compiler uses are in a different spot than /usr/include. Make sure you read the documentation on building kernels (and android) and understand what you need to do to make sure your build environment is correct.
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

  5. #5
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, or in a galaxy far, far away.
    Posts
    8,974
    Also, I meant the -I option for include files, not -L for link libraries. Sorry, my bad...
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

  6. #6
    Just Joined!
    Join Date
    Oct 2009
    Location
    Cambridge, UK
    Posts
    15

    Thank you Rubberman.

    Hi Rubberman,
    You were right. I found it was looking in the folder
    Code:
    /bionic/libc/kernel/common/linux
    for the header files and uinput.h was missing. I added the header uinput from the normal kernel and it is working.

    Thanks,
    Tony

Posting Permissions

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