I had the same problems with compiling in global scripts: AP_GLOB.H errors after installing wincc 6.0, step 7, wincc flexible 2008 sp2, drive es 5.5. Installing service packs and patches for wincc has no positive result. OS is Win XP professional sp3.
But AP_GLOB.H file was absolutely correct...