- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
All,
When I compile my application with uclibc, I got the following error message. <div class='quotetop'>QUOTE </div> --- Quote Start --- C:/altera/kits/nios2/bin/eclipse/plugins/com.microtronix.nios2linux.uClibc_0.1.0/include/linux/byteorder/little_en ian.h:45: error: `__le64' undeclared (first use in this function)[/b] --- Quote End --- After using the "-E" instead of "-c", I find out the root cause of this problem. The include directory is "C:/altera/kits/nios2/bin/eclipse/plugins/com.microtronix.nios2linux.uClibc_0.1.0/include/". In the file <linux/byteorder/little_endian.h>, I got the "undefined error message" for the symbol "__le64", but it was defined in <linux/types.h>. But unfortunately, only if we do not define "__KERNEL_STRICT_NAMES", "__le64" will be defined as expected. And the "__KERNEL_STRICT_NAMES" is defined in <features.h>, since the "_LOOSE_KERNEL_NAMES" is not defined. And, I also checked the uclibc.org about the uclibc file. It seems they do not have the <linux/types.h> file. They using default types.h file. I grapped mazur's version 2.6.9.1 linux/byteorder/little_endian.h for __le64, and this was what I got: ./linux/byteorder/little_endian.h:#define __le64_to_cpu(x) ((__u64)(x)) ./linux/byteorder/little_endian.h:#define __le64_to_cpup(x) (*(__u64*)(x)) ./linux/byteorder/little_endian.h:#define __le64_to_cpus(x) do {} while (0) __u64 is defined in your architecture's asm file, in my case: ./asm-i386/types.h:typedef unsigned long long __u64; So, is there anyone can help me step out of this problem? Thanks, NeoLink Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Who can help me solve this problem?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
well, my recommendation is, check the source code of your application to see if <asm/byteorder.h> is being included somewhere, and try removing it if. If this doesn't remove the problem, can you post more details about the error message?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you for your response. In fact, I am going to port the application to uclinux. And it uses the header file as
# ifdef LINUX# include <asm/byteorder.h># endif And the LINUX is defined. Why do I need to remove this header files? And I found there is much difference between the uclibc header files and the header files in the following link. http://ep09.pld-linux.org/~mmazur/linux-libc-headers/ (http://ep09.pld-linux.org/~mmazur/linux-libc-headers/). Could you explain the difference for me?- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This header file is intended for kernel use only, and it mainly defines the byte order of the target machine, along with some helper functions. If I were you, I would try to remove the including of that file, put a "#define __LITTLE_ENDIAN 1234" in the same location, and give the compiler a run. If the application needs more than that, just copy them from that header file ...

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page