Altera_Forum
Honored Contributor
20 years agoCompiling problems with uclibc ...
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, Neo