使用OpenWRT工具链交叉编译OpenWRT Linux环境的POCO库(Cross-compiling the POCO library for OpenWRT Linux environment using the OpenWRT toolchain)
我正在尝试使用OpenWRT工具链交叉编译OpenWRT Linux环境的POCO源包。 我已经下载了POCO源代码包,我正在尝试交叉编译它,但是我得到的错误日志如下所示
src/Error.cpp: In static member function 'static std::string Poco::Error::getMessage(int)': src/Error.cpp:71:55: error: invalid conversion from 'int' to 'const char*' [-fpermissive] return std::string(strerror_r(errorCode, errmsg, 256)); ^ In file included from /home/ubuntu/subhendu/options_cg/trunk/staging_dir/toolchain-mips_34kc_gcc-4.8-linaro_musl-1.1.10/mips-openwrt-linux-musl/include/c++/4.8.3/string:53:0, from include/Poco/Bugcheck.h:24, from include/Poco/Foundation.h:148, from src/Error.cpp:17: /home/ubuntu/subhendu/options_cg/trunk/staging_dir/toolchain-mips_34kc_gcc-4.8-linaro_musl-1.1.10/mips-openwrt-linux-musl/include/c++/4.8.3/bits/basic_string.tcc:212:5: error: initializing argument 1 of 'std::basic_string<_CharT, _Traits, _Alloc>::basic_string(const _CharT*, const _Alloc&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]' [-fpermissive] basic_string<_CharT, _Traits, _Alloc>:: ^ /home/ubuntu/subhendu/Poco/poco-1.6.0/build/rules/compile:53: recipe for target '/home/ubuntu/subhendu/Poco/poco-1.6.0/Foundation/obj/Linux/x86_64/debug_shared/Error.o' failed make[1]: *** [/home/ubuntu/subhendu/Poco/poco-1.6.0/Foundation/obj/Linux/x86_64/debug_shared/Error.o] Error 1 make[1]: Leaving directory '/home/ubuntu/subhendu/Poco/poco-1.6.0/Foundation' Makefile:69: recipe for target 'Foundation-libexec' failed make: *** [Foundation-libexec] Error 2
如果有人遇到同样的问题或对如何解决它有任何想法,请给出你的解决方案......
I am trying to cross compile the POCO source package for OpenWRT Linux environment using the OpenWRT toolchain. I have downloaded the POCO source package and am trying to cross compile it, but I am getting the error log as below
src/Error.cpp: In static member function 'static std::string Poco::Error::getMessage(int)': src/Error.cpp:71:55: error: invalid conversion from 'int' to 'const char*' [-fpermissive] return std::string(strerror_r(errorCode, errmsg, 256)); ^ In file included from /home/ubuntu/subhendu/options_cg/trunk/staging_dir/toolchain-mips_34kc_gcc-4.8-linaro_musl-1.1.10/mips-openwrt-linux-musl/include/c++/4.8.3/string:53:0, from include/Poco/Bugcheck.h:24, from include/Poco/Foundation.h:148, from src/Error.cpp:17: /home/ubuntu/subhendu/options_cg/trunk/staging_dir/toolchain-mips_34kc_gcc-4.8-linaro_musl-1.1.10/mips-openwrt-linux-musl/include/c++/4.8.3/bits/basic_string.tcc:212:5: error: initializing argument 1 of 'std::basic_string<_CharT, _Traits, _Alloc>::basic_string(const _CharT*, const _Alloc&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]' [-fpermissive] basic_string<_CharT, _Traits, _Alloc>:: ^ /home/ubuntu/subhendu/Poco/poco-1.6.0/build/rules/compile:53: recipe for target '/home/ubuntu/subhendu/Poco/poco-1.6.0/Foundation/obj/Linux/x86_64/debug_shared/Error.o' failed make[1]: *** [/home/ubuntu/subhendu/Poco/poco-1.6.0/Foundation/obj/Linux/x86_64/debug_shared/Error.o] Error 1 make[1]: Leaving directory '/home/ubuntu/subhendu/Poco/poco-1.6.0/Foundation' Makefile:69: recipe for target 'Foundation-libexec' failed make: *** [Foundation-libexec] Error 2
If anybody faced the same issue or has any idea on how to resolve it, please give your solution...
原文:https://stackoverflow.com/questions/31578214
最满意答案
您将需要使用
Unicode
正则表达式。 请检查以前的SO线程,其中讨论了各种unicode匹配机制。You will need to use
Unicode
regular expressions. Please check this previous SO thread in which various unicode matching mechanisms are discussed.
相关问答
更多-
在JavaScript中,当你想在正则表达式中处理Unicode时,通常的解决方案就是放弃。 下一个最常用的解决方案是使用xregexp ,它恰好有你需要的类 : var unicodeWord = XRegExp('^\\p{L}+$'); unicodeWord.test('Русский'); // -> true unicodeWord.test('日本語'); // -> true unicodeWord.test('العربية'); // -> true In JavaScript, wh ...
-
你做了太多的逃避 /^[a-z0-9/. -]+$/i 在字符类中,只有[ , ] , \ , -和^具有特殊含义, ^即使只是第一个字符,而且-仅当它在字符之间时 。 为了匹配文字^只是把它放在任何位置,但第一个。 要匹配-字面意思,不要把它放在字符之间(即,在开头或结尾)。 逃避/ ,。 或$永远不需要。 You do too much escaping /^[a-z0-9/. -]+$/i In a character class, only [, ], \, - and ^ have speci ...
-
仅允许使用字母数字和特殊字符的正则表达式不起作用(Regex allowing only alphanumeric and special characters does not work)[2022-04-13]
我看到两个主要问题。 一个是在字符串"..." ,反斜杠\具有特殊含义,与正则表达式中的特殊含义无关。 特别是, \d最终会成为d - 而不是你想要的。 最好的解决方法是使用/.../表示法而不是new RegExp("...") : var regPassword = /^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[$@$!%*?&])[A-Za-z\d$@$!%*?&]$/; 另一个问题是你的正则表达式与你的要求不符。 实际上,你所说的要求并没有多大意义,但我猜你想要这样的 ... -
根据这个文件 ,这里是unicode中文字符范围: 表12-2。 包含汉字表意文字的块 Block Range Comment CJK Unified Ideographs 4E00–9FFF Common CJK Unified Ideographs Extension A 3400–4DBF Rare CJK Unified Ideographs Extension B 20 ...
-
您将需要使用Unicode正则表达式。 请检查以前的SO线程,其中讨论了各种unicode匹配机制。 You will need to use Unicode regular expressions. Please check this previous SO thread in which various unicode matching mechanisms are discussed.
-
JavaScript 不支持 Unicode脚本语法,例如\p{Cyrillic} 。 如果您不相信我,您可以查看ECMA-262的规格。 截至第5版,不支持。 在JavaScript中进行严格的多语言验证的唯一方法是列出字符范围,例如\uxxxx-\uyyyy 。 Unicode脚本语法只是由Unicode Consortium根据数据文件实现的。 直接使用Unicode Script语法很方便,并使代码清洁。 但是,您不知道字符类到底匹配的是什么。 您可以利用这个机会查看字符列表并过滤掉您不想要的任何内 ...
-
JavaScript正则表达式(带_-的字母数字字符)(JavaScript regular expression ( alphanumeric characters with _-))[2022-04-19]
尝试这个: /^[0-9a-zA-Z-_]+$/ 如果在可以将其解释为_-等范围的位置输入短划线符号“ - ”,则表示ascii表中与_或以上匹配的任何字符。 Try this: /^[0-9a-zA-Z-_]+$/ If you enter the dash sign "-" at a position where it can be interpreted as a range such as _- it would mean any characters matching _ or above i ... -
是的,你可以使用角色类交集。 例: [\\p{ASCII}&&\\P{Alnum}] 这意味着:所有ascii字符和所有非字母数字字符之间的交集 Yes you can use a character class intersection. Example: [\\p{ASCII}&&\\P{Alnum}] This means: intersection between all ascii characters and all non alphanumeric characters
-
消毒/替换所有日语,中文韩语,俄语等字符(Sanitize/Replace all Japanese, Chinese Korean, Russian etc. characters)[2022-11-10]
至于日语,作为一个例子,通常有一个罗马字表示所有只使用ascii字符的东西,并且仍然给出了原始字符的可逆和可理解的表示。 然而,将某些内容翻译成romanji需要您知道正确的发音,这通常取决于使用字符的含义或上下文。 这使得简单地转换所有内容(或者至少不能有效地用于简单的消毒剂)变得困难(如果不是不可能的话)。 这种情况同样适用于中国人。 另一方面,韩语有一个非常简单的字符集,应该可以很容易地翻译成罗马字母表。 另一个常见问题是没有一种罗马化方法; 这些语言通常有不同的语言,不同的人使用(例如日语有两种常见 ... -
试试这个: ^[a-zA-Z ]+$ ^ ... $ - 标记字符串边界(从头到尾) [ ]+ - 在[ ]内匹配至少一个字符的字符 Try this: ^[a-zA-Z ]+$ ^ ... $ - Mark string boundaries (start to end) [ ]+ - Match atleast one character of characters inside [ ]