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;
............................
.............................
}
...
- 10-19-2009 #1Just 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.
But i get errorCode:#include<linux/input.h> #include<linux/uinput.h> #include<lsys/time.h> void func (foo) { struct uinput_user_dev uinp; ............................ ............................. }
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.HTML Code:error: linux/uinput.h: No such file or directory. error:storage size of 'uinp' is'nt known
Any pointers are appreciated.
Thanks,
Tony
- 10-19-2009 #2Linux Guru
- 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!
- 10-19-2009 #3Just 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
- 10-19-2009 #4Linux Guru
- 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!
- 10-19-2009 #5Linux Guru
- 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!
- 10-20-2009 #6Just 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 folderfor the header files and uinput.h was missing. I added the header uinput from the normal kernel and it is working.Code:/bionic/libc/kernel/common/linux
Thanks,
Tony


