Home
Developer Resources
QNX RTOS v4
QNX RTOS v4 Knowledge Base

QNX RTOS v4 Knowledge Base

Foundry27
Foundry27
QNX RTOS v4 project
Resources

QNX RTOS v4 Knowledge Base

Title Predefine an array of Pt_Widget_t pointers?
Ref. No. QNX.000009909
Category(ies) Development
Issue We want to initialize an array of PtWidget_t pointers as follows:
x09PtWidget_t *arrayname[3] = {ABW_name1, ABW_name2, ABW_name3};

The instance names are from an application created in PhAB. When compiling this, we get error message "expression must be constant".

What could be the problem?
Solution ABW_xxxx pointers are assigned at application startup. This is why you are getting the "expression must be costant" error - because the values do not exist at compile-time.