You should enable Assignable typed constants in compiler options.
Set to True.
But yes, XE2 should have already png support, just remove the nxPascal png folder from the paths.
If i remember correctly, i had same problem with XE(2)