Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

c++

c#

event-log

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
- ??

Edit 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.

like image 271
smwikipedia Avatar asked Jul 23 '10 07:07

smwikipedia


1 Answers

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.

like image 132
Hans Passant Avatar answered Sep 20 '22 12:09

Hans Passant