aMule Forum
English => Compilation problems => Topic started by: p.r. on January 17, 2009, 06:05:26 PM
-
I have cross-compilation error with aMule-2.2.3 source code.
But I had no errors with aMule-2.2.2 source code, the problem occurs only with aMule-2.2.3 source code.
I can't understand why "uintptr_t" is undeclared.
I have no knowledge of C/CPP
Please help.
Cross-toolchains: Linux kernel 2.4.21-pre4
uClibc 0.9.26
GCC-3.3.3
powerpc-linux-uclibc/include/stdint.h (fragment): /* Types for `void *' pointers. */
#if __WORDSIZE == 64
# ifndef __intptr_t_defined
typedef long int intptr_t;
# define __intptr_t_defined
# endif
typedef unsigned long int uintptr_t;
#else
# ifndef __intptr_t_defined
typedef int intptr_t;
# define __intptr_t_defined
# endif
typedef unsigned int uintptr_t;
#endif
cross-compilation errors ...
Compiling Format.cpp
Format.cpp: In member function `CFormat& CFormat::operator%(void*)':
Format.cpp:432: error: `uintptr_t' undeclared (first use this function)
Format.cpp:432: error: (Each undeclared identifier is reported only once for
each function it appears in.)
Format.cpp:432: error: parse error before `)' token
Format.cpp:434: error: parse error before `)' token
make[4]: *** [Format.o] Error 1
make[3]: *** [all-recursive] Error 1
make[2]: *** [all-recursive] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2
-
Could you please try to include stdint.h in the file Format.cpp (add #include <stdint.h> where the other includes are) and see if it works then?
-
Could you please try to include stdint.h in the file Format.cpp (add #include <stdint.h> where the other includes are) and see if it works then?
Thank you, it works.
Simple insertion of #include <stdint.h>
into Format.cpp has corrected the error: ...
Building libec.a
Compiling Format.cpp
Compiling MD5Sum.cpp
Compiling MuleDebug.cpp
Compiling StringFunctions.cpp
Compiling FileFunctions.cpp
Compiling TextFile.cpp
Compiling Path.cpp
...
There was no need to add stdint.h with full path.
-
Thanks a lot for this report, this problem will not occur with the next version of aMule. :)