When making libgettext, I got an error: undefined reference to gl_locale_name.
By google, I got to know one guy said in
http://stackoverflow.com/questions/2753996/is-there-a-way-to-access-the-locale-used-by-gettext-under-windows:
Turns out the "gl_locale_name" function was not part of gettext directly, but rather part of gnulib -
http://www.gnu.org/software/gnulib. I just discovered the package today.
So getting the infamous localename.h header in my project was a matter of
gnulib-tool --import localename
Then the gl_locale_name function works just fine when cross-compiling.
Thanks to everyone for the answers !
So I tried to find out how to use gnulib, and got the following from
http://www.gnu.org/software/gnulib/manual/html_node/index.html#Top:
Invoking ‘gnulib-tool --import’ will copy source files, create a Makefile.am to build them, generate a file gnulib-comp.m4 with Autoconf M4 macro declarations used by configure.ac, and generate a file gnulib-cache.m4 containing the cached specification of
how Gnulib is used.
Our example will be a library that uses Autoconf, Automake and Libtool. It calls strdup, and you wish to use gnulib to make the package portable to C89 and C99 (which don't have strdup).
~/src/libfoo$ gnulib-tool --import strdup
Module list with included dependencies:
absolute-header
extensions
strdup
string
File list:
lib/dummy.c
lib/strdup.c
lib/string.in.h
m4/absolute-header.m4
m4/extensions.m4
m4/gnulib-common.m4
m4/strdup.m4
m4/string_h.m4
Creating directory ./lib
Creating directory ./m4
Copying file lib/dummy.c
Copying file lib/strdup.c
Copying file lib/string.in.h
Copying file m4/absolute-header.m4
Copying file m4/extensions.m4
Copying file m4/gnulib-common.m4
Copying file m4/gnulib-tool.m4
Copying file m4/strdup.m4
Copying file m4/string_h.m4
Creating lib/Makefile.am
Creating m4/gnulib-cache.m4
Creating m4/gnulib-comp.m4
Finished.
You may need to add #include directives for the following .h files.
#include <string.h>
Don't forget to
- add "lib/Makefile" to AC_CONFIG_FILES in ./configure.ac,
- mention "lib" in SUBDIRS in Makefile.am,
- mention "-I m4" in ACLOCAL_AMFLAGS in Makefile.am,
- invoke gl_EARLY in ./configure.ac, right after AC_PROG_CC,
- invoke gl_INIT in ./configure.ac.
~/src/libfoo$
and then I happened search gl_locale_name in the gettext folder, and got several gl_locale_name.o, and the gnulib-lib/localename.o is ok.
Then I added the file to the link:
am_msginit_OBJECTS = ../gnulib-lib/localename.o msginit-msginit.$(OBJEXT) \
msginit-lang-table.$(OBJEXT) msginit-plural-count.$(OBJEXT) \
msginit-localealias.$(OBJEXT) msginit-lock.$(OBJEXT)
分享到:
相关推荐
fileinput_locale_zh文件上传 图片上传 英文转中文 这是一个增强的 HTML5 文件输入控件,是一个 Bootstrap 3.x 的扩展,实现文件上传预览,多文件上传等功能。
OpenCms7.5.x_Locale_China汉化.zip
资源来自pypi官网。 资源全名:django_suit_locale-1.0.1-py2.py3-none-any.whl
matlab 2016a 由于找不到 boost_locale-vc120-mt-1_56.dll,无法继续执行代码。重新安装程序可能会解决此问题。
如果我们查看第篇章,在章详情的地址前也对应的加上了地区码,我们可能有很多controller类都需要限制_locale参数。我们打开config录,打开serv
rails_locale_detection 结合使用参数,cookie,http标头和可选的用户对象来设置请求的当前语言环境。 反过来,它检查params[:locale] , cookies[:locale]和HTTP_ACCEPT_LANGUAGE标头的值,以找到与可用语言环境...
flex国际化的使用示例教程,方便大学学习,共享一下!
我的MVC做的一个文本框感应提示的小测试例子.
idr master for specific language app
函数 sort_locale 在 MATLAB 中执行区域设置敏感的排序。 输入参数可以是字符向量元胞数组或字符串数组。 默认语言环境是 cs_CZ。 其他支持的语言可以在这里找到: ...
函数 [LOCALE_SHORT_STRING LCID_HEX_STRING LCID_VALUE LOCALE_DESCRIPTION] = GET_SYSTEM_LOCALE 返回系统区域设置信息。 在 Windows XP 和 Linux 上测试。 输入:无输出: LOCALE_SHORT_STRING - 语言环境短字符...
博客专用: Jqgrid学习笔记__01__初来乍到 很多时候在网上下载一段代码,结果引用的CSS和JS文件不知道从哪里弄,结果上网下载,不是版本不对,就是完全不对。这里的JS是有对应的代码段的。请参考博客 ====> Jqgrid...
Magento 语言环境重定向Magento 扩展,用于根据客户端的 Accept Language 标头将用户重定向到商店。 如果商店不支持浏览器列表中的任何语言 - 显示默认商店语言。...locale_redirect.git作曲家安装作曲家: : 安装
umi项目 入门 安装依赖项 $ yarn 启动开发服务器, $ yarn start
TSN_JAVA_Locale NetBeans上的Java应用程序的支持UTF16:Дляполучениястрокв:
boost_1.69.0库 VS2017重新编译的库:Release版,其他版本:Debug和DLL库在我的主页可以找到,因为资源太大,不让一次向上传。
JsonCPP 源码上传记录(已测试),可供下载
unity3D官网最全中文检索工具,官网下载API!!!
fileinput_locale_zh.js bootstrap 文件上传 图片上传 英文转中文 fileinput