MC (Microsoft's Message Compiler) replacement for Linux GCC

北城以北 提交于 2020-01-06 02:47:07

问题


What is the equivalent mechanism in Linux GCC for the message compiler in Windows VC++?

What I need to do is to be able to have localized messages with the same ID for each message in all languages, then to "compile" the messages so the general code compiler will take the message according to the language specified.

For example, I work in Windows with messages from this structure:

MessageId=100

SymbolicName=ID_GENERAL_ERROR

Language=English

General error.

Within my C++ code I just use ID_GENERAL_ERROR, and when I compile the messages file I set the language I want. (Actually I use the MC compiler to generate a header file that contains the messages in the selected language).

Is there a common way to do so in Linux\ GCC?

Thank you in advance.


回答1:


This is not specific to gcc, have a look at gnu gettext which is the natural tool for linux.

http://www.gnu.org/software/gettext/manual/gettext.html



来源:https://stackoverflow.com/questions/4501040/mc-microsofts-message-compiler-replacement-for-linux-gcc

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!