Summary
Error
A VuGen script contains a variable declaration which uses a type that is declared in a typedef. For example, a header file may have the following typedef:
typedef int regoff_t;
typedef struct {
regoff_t rm_so;
regoff_t rm_eo;
} regmatch_t;
and the script then includes a variable declaration as follows:
regmatch_t arr[100];
When this script is opened in the Design Studio in the LoadRunner VuGen 11.5x, the following error is displayed:
Script parse failed, please fix the errors before scanning
In addition the script "Error" tab displays:
Syntax error, unexpected IDENTIFIER, wrong token = <variable name>
Cause
The VuGen parser does not currently support referencing a typedef that is declared in a script.
Fix
A possible workaround is to replace the typedef with a struct declaration with an empty tag in the header file, for example:
struct rm_struct {
int rm_so;
int rm_eo;
};
and change the variable definition in the script to use the struct and not the typedef:
struct rm_struct arr[100];