开发者

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

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, a开发者_JAVA技巧nd 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.


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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜