Support : Knowledge base

Knowledge Base

Welcome to OPAL-RT’s Knowledge Base

OPAL-RT offers a repository of support information for optimal use of its technology.

Loading…

Please note that OPAL-RT knowledge base is not fully optimized for mobile platforms.

For optimal experience, use a desktop computer.

Reference Number: AA-01966// Views: AA-01966// Created: 2020-11-23 19:05:44// Last Updated: 2020-11-24 15:25:09
Problem & Solution
Compilation error at the build stage : error: expected a ")"

Problem

I have a model that runs correctly offline but at the compilation I have an issue at the building stage:

wind_turbine_sim_new_1_sm_subsystem.c(12524): error: expected a ")"

        ssSetPath(rts,

        ^

Solution

This error could happen if unexpected characters has been defined in a block/ subsystem name. As a rule of thumb, it's never a good idea to have a name for a block / subsystem on multiple lines that contains special characters or space ( like : +, &, ", ... ).

In this case, to know which block is causing issue, you can open the .c file specified in the error message using Notepad++ (or any other editor). The number between () will be the line where the error is in the generated C code.

In your RT-LAB project folder, you will need to go here to find this C file: RT-LABv2020.4_Workspace\PROJECT_NAME\models\NAME_OF_YOUR_MODEL\SUBSYSTEM_DEFINED_IN_THE_ERROR\OpREDHAWKtarget


You can then open this .c file, check at which line you have an error and verify if it's link to an error of the naming.

In this case, we can see that the issue is linked to the name: MPPT Controller using  "Incremental Conductance + Integral Regulator"  technique. The name is on more than one line, and has several unsupported characters. The block is located here in the model: "wind_turbine_sim_new_1_sm_subsystem/SM_Subsystem/PV_SolarFarm/"