开发者

Who knows how to use the mc.exe (Message Compiler)?

I am trying to use the mc.exe to make message files for my event log writing program. But even the sample message file provided by the Microsoft won't compile. Who knows how to write a message file that could be compiled by mc.exe?

EDIT: The error message I got is :

msgs.mc(1) : error : expected keyword
- ??

E开发者_运维技巧dit 2: Problem solved. The mc.exe can only support Unicode or ANSI encoded source file. My file is encoded as UTF8. That's it.

Thanks.


Always document the error message you get

Being forced to guess: if you get an error in line #82, complaining about an invalid character (0x2e), then open the file in a text editor, put the cursor after the . and press Enter so the line is terminated with a line feed.


Problem solved. The mc.exe can only support Unicode or ANSI encoded source file. My file is encoded as UTF8. That's it.

Thanks guys.


The sample works for me in Visual Studio 2008 or 2010. How about posting your msgs.mc file.

Also did you save as plain ascii? Maybe the encoding header is confusing it...

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜