some logical check list investigations only to explore:
-#include : verify if the filename path has not changed.
you include a hard coded path with the header file name, Visual FoxPro searches for the header file only in the specified location.
If you do not include a path with the header file name, Visual FoxPro searches for the header file in the default Visual FoxPro directory, and then along the Visual FoxPro path. The Visual FoxPro path is specified with SET PATH.
-you mention "IVSSQLEXEC" and "IVSSQLEXE" in typical call... : is that normal (not the same ?)
-maybe separate the h files (why not one xfoxpro.h with all constants?)
however the maximum number of compiler levels for #INCLUDE is 4 in VFP.