简体   繁体   English

使用arm-linux-gcc编译STLPort时发生未知错误

[英]unknown error when compile STLPort with arm-linux-gcc

I was trying to compile STLPort with cross-compiler toolchaine for uclinux. 我正在尝试使用适用于uclinux的交叉编译器工具链编译STLPort。 According to INSTALL in root folder of STLPort library, if you want add new toolchaine, then you must find most nearest toolchaine and modified for your compiler. 根据STLPort库的根文件夹中的INSTALL,如果要添加新的工具链,则必须找到最接近的工具链并为编译器进行修改。 I select gcc.mak and change gcc to arm-linux-gcc and c++ to arm-linux-c++. 我选择gcc.mak并将gcc更改为arm-linux-gcc,将c ++更改为arm-linux-c ++。 I got this error when compile : 编译时出现此错误:

.../../src/num_get_float.cpp:44:6: #error Unknown endianness.
../../src/num_get_float.cpp: In function `double stlpmtx_std::_Stl_atod(char*, 
   int, int)':
../../src/num_get_float.cpp:728: error: 'struct _ll::<anonymous>' has no member 
   named 'hi'
../../src/num_get_float.cpp:729: error: 'struct _ll::<anonymous>' has no member 
   named 'lo'
../../src/num_get_float.cpp:736: error: 'struct _ll::<anonymous>' has no member 
   named 'hi'
../../src/num_get_float.cpp:737: error: 'struct _ll::<anonymous>' has no member 
   named 'lo'

what is this error? 这是什么错误? how can I make a appropciate Makefile for STLPort on arm-linux-gcc? 如何在arm-linux-gcc上为STLPort制作合适的Makefile?

EDIT : Error is fixed by first answer but I have another error : When I try to compile the code, the makefile gets me this sentences : 编辑 :错误是由第一个答案解决的,但是我还有另一个错误:当我尝试编译代码时,makefile会给我这句话:
* ATTENTION! *注意! * *
This makefile tries to use system locale which might not work well with all glibc flavours. 该makefile尝试使用可能不适用于所有glibc风格的系统区域设置。 If build fails, please resort to gcc.mak which will build C-locale only version for STLport and in the end I got this errors for c_local.c: 如果构建失败,请诉诸gcc.mak,它将为STLport构建仅C语言环境的版本,最后我得到c_local.c的错误:

In file included from c_locale.c:32:
arm-linux-gcc -I../stlport -W -Wno-sign-compare -Wno-unused -Wno-uninitialized -D_STLP_USE_GLIBC -D_STLP_REAL_LOCALE_IMPLEMENTED -O2 -fpic c_locale.c -c -o ../lib/obj/GCC/ReleaseD/c_locale.o
c_locale_glibc/c_locale_glibc.c: In function `_Find_locale':
c_locale_glibc/c_locale_glibc.c:118: warning: return makes pointer from integer without a cast
c_locale_glibc/c_locale_glibc.c: In function `_Locale_decimal_point':
c_locale_glibc/c_locale_glibc.c:242: error: `DECIMAL_POINT' undeclared (first use in this function)
c_locale_glibc/c_locale_glibc.c:242: error: (Each undeclared identifier is reported only once
c_locale_glibc/c_locale_glibc.c:242: error: for each function it appears in.)
c_locale_glibc/c_locale_glibc.c: In function `_Locale_thousands_sep':
c_locale_glibc/c_locale_glibc.c:246: error: `THOUSANDS_SEP' undeclared (first use in this function)
c_locale_glibc/c_locale_glibc.c: In function `_Locale_grouping':
c_locale_glibc/c_locale_glibc.c:250: error: `GROUPING' undeclared (first use in this function)
c_locale_glibc/c_locale_glibc.c: In function `_Locale_int_curr_symbol':
c_locale_glibc/c_locale_glibc.c:289: error: `INT_CURR_SYMBOL' undeclared (first use in this function)
c_locale_glibc/c_locale_glibc.c: In function `_Locale_currency_symbol':
c_locale_glibc/c_locale_glibc.c:292: error: `CURRENCY_SYMBOL' undeclared (first use in this function)
c_locale_glibc/c_locale_glibc.c: In function `_Locale_mon_decimal_point':
c_locale_glibc/c_locale_glibc.c:295: error: `MON_DECIMAL_POINT' undeclared (first use in this function)
c_locale_glibc/c_locale_glibc.c: In function `_Locale_mon_thousands_sep':
c_locale_glibc/c_locale_glibc.c:298: error: `MON_THOUSANDS_SEP' undeclared (first use in this function)
c_locale_glibc/c_locale_glibc.c: In function `_Locale_mon_grouping':
c_locale_glibc/c_locale_glibc.c:301: error: `MON_GROUPING' undeclared (first use in this function)
c_locale_glibc/c_locale_glibc.c: In function `_Locale_positive_sign':
c_locale_glibc/c_locale_glibc.c:304: error: `POSITIVE_SIGN' undeclared (first use in this function)
c_locale_glibc/c_locale_glibc.c: In function `_Locale_negative_sign':
c_locale_glibc/c_locale_glibc.c:307: error: `NEGATIVE_SIGN' undeclared (first use in this function)
c_locale_glibc/c_locale_glibc.c: In function `_Locale_int_frac_digits':
c_locale_glibc/c_locale_glibc.c:310: error: `INT_FRAC_DIGITS' undeclared (first use in this function)
c_locale_glibc/c_locale_glibc.c: In function `_Locale_frac_digits':
c_locale_glibc/c_locale_glibc.c:313: error: `FRAC_DIGITS' undeclared (first use in this function)
c_locale_glibc/c_locale_glibc.c: In function `_Locale_p_cs_precedes':
c_locale_glibc/c_locale_glibc.c:316: error: `P_CS_PRECEDES' undeclared (first use in this function)
c_locale_glibc/c_locale_glibc.c: In function `_Locale_p_sep_by_space':
c_locale_glibc/c_locale_glibc.c:319: error: `P_SEP_BY_SPACE' undeclared (first use in this function)
c_locale_glibc/c_locale_glibc.c: In function `_Locale_p_sign_posn':
c_locale_glibc/c_locale_glibc.c:322: error: `P_SIGN_POSN' undeclared (first use in this function)
c_locale_glibc/c_locale_glibc.c: In function `_Locale_n_cs_precedes':
c_locale_glibc/c_locale_glibc.c:325: error: `N_CS_PRECEDES' undeclared (first use in this function)
c_locale_glibc/c_locale_glibc.c: In function `_Locale_n_sep_by_space':
c_locale_glibc/c_locale_glibc.c:328: error: `N_SEP_BY_SPACE' undeclared (first use in this function)
c_locale_glibc/c_locale_glibc.c: In function `_Locale_n_sign_posn':
c_locale_glibc/c_locale_glibc.c:331: error: `N_SIGN_POSN' undeclared (first use in this function)
c_locale_glibc/c_locale_glibc.c: In function `_Locale_ctype_create':
c_locale_glibc/c_locale_glibc.c:485: error: `_NL_CTYPE_TOLOWER_EL' undeclared (first use in this function)
c_locale_glibc/c_locale_glibc.c:487: error: `_NL_CTYPE_TOUPPER_EL' undeclared (first use in this function)
c_locale_glibc/c_locale_glibc.c: In function `cname_lookup':
c_locale_glibc/c_locale_glibc.c:526: error: `_NL_CTYPE_NAMES_EL' undeclared (first use in this function)
c_locale_glibc/c_locale_glibc.c:531: error: `_NL_CTYPE_HASH_SIZE' undeclared (first use in this function)
c_locale_glibc/c_locale_glibc.c:532: error: `_NL_CTYPE_HASH_LAYERS' undeclared (first use in this function)
make: *** [../lib/obj/GCC/ReleaseD/c_locale.o] Error 1

I think this error is related to attention of makefile. 我认为此错误与makefile的关注有关。 What can I fix the problem? 我该如何解决该问题? what is resort for gcc.mak in attendtion? gcc.mak参加会议的胜地是什么?

Check the endianness of the ARM processor you want to run uclinux on. 检查要在其上运行uclinux的ARM处理器的字节序。 Then you can try running gcc -D_STLP_BIG_ENDIAN ... or gcc -D_STLP_LITTLE_ENDIAN ... in your Makefile to get past this error. 然后,您可以尝试在Makefile中运行gcc -D_STLP_BIG_ENDIAN ...gcc -D_STLP_LITTLE_ENDIAN ...以解决此错误。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM