In reply to eranv:
Your issue is the declaration of ‘result’ in the SV code. You are declaring ‘result’ as a dynamic array, where the DPI is expecting a static array. These data types are different and not compatible.
You want:
function void nmu_sv_get_l_y_msb_array_by_index(int index);
int result[100];
nmu_cpp_get_l_y_msb_array_by_index(index,p_nmu_simulator,result);
endfunction : nmu_sv_get_l_y_msb_array_by_index