tags:

views:

72

answers:

3

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.

+1  A: 

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.

Hans Passant
+1  A: 

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

ngoozeff
+1  A: 

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.

smwikipedia