Vugen won't compile code with a #define statement because of an apostrophe in the comment.

  • KM00440530
  • 29-May-2013
  • 29-May-2013

Summary

Vugen won't compile code with a #define statement because of an apostrophe in the comment.

Error

If for example you create a #define statement like shown below:

#define Example 0x01 // it's going to fail

Action()
{
return 0;
}

The script will error our upon compilation with the following errors:

Error: CCI compilation error -...:
.
Error: CCI compilation error -Action.c:1:27: unterminated character constant
.
Error: Vuser compilation failed. Please set CCIDebug to Off in CCI section of mdrv.dat file.
Warning: Extension cciext.dll reports error -19797 on call to function ExtPerProcessInitialize
Error: Thread Context: Call to service of the driver failed, reason - thread context wasn't initialized on this thread.

Cause

This is happening because of the apostrophe in the comment //it's, if you remove it and leave its it will work. This is a bug in Vugen and will be fixed in releases after 11.52.

Fix

As a workaround you can use /* */ for commenting out instead of //, this will circumvent the issue or just remove the apostrophes.