With all previous modifications, Altera OpenCL code now builds provided I don't use <iostream>, because their libstd++ breaks that.