problems with include paths

I have problems finding include files that are defined in a makefile with pgcc under cygwin.

I installed pgWIN 8.0.1 on a WIN XP system with a already installed regular cygwin.

Is this o.k., or do I have to remove the regular Cygwin before PG installation?

Variables are defined via “export” in a sh script. All these are set properly.

The makefile has several includes in separate *.mk files that desribe directory paths.

These -Ipaths are extended properly, however pgcc complains not to find the include files albeit they they are in respective dirs

make: *** [miscmaths.o] Error 2
pgcpp -w -I/cygdrive/c/fslneu/extras/include/newmat -I/cygdrive/c/fslneu/src/miscmaths -I/cygdrive/c/fslneu/extras/include/libprob
-I/cygdrive/c/fslneu/extras/include/zlib -I. -I/cygdrive/c/fslneu/include -I/cygdrive/c/fslneu/include -c -o optimise.o
“c:\fslneu\src\miscmaths\optimise.h”, line 76: catastrophic error: could not
open source file “newmatap.h”
#include “newmatap.h”

this is the makefile

include ${FSLCONFDIR}/

PROJNAME = miscmaths


OBJS = miscmaths.o optimise.o miscprob.o kernel.o histogram.o base2z.o t2z.o f2z.o volume.o volumeseries.o minimize.o cspline.o sparse_matrix.o sparsefn.o rungekutta.o nonlin.o bfmatrix.o

LIBS = -lutils -lfslio -lniftiio -lznz -lz -lnewmat -lprob -lm

all: libmiscmaths.a

quick:${OBJS} quick.o
${CXX} ${CXXFLAGS} ${LDFLAGS} -o $@ ${OBJS} quick.o ${LIBS}

libmiscmaths.a: ${OBJS}
${AR} -r libmiscmaths.a ${OBJS}

This is the code of file

Assumes that ${FSLDIR} is set as an environment variable

include ${FSLCONFDIR}/common/
include ${FSLCONFDIR}/common/

this is a snippet of a file called


GD library


GDC library


The same problem exists with libs and corresponding paths.
When I have the *.h files in the building dir they are found.

I would appreciate any help


Hi a_bra,

Is this o.k., or do I have to remove the regular Cygwin before PG installation?

This is fine. The compilers are Windows native (i.e. DOS) which can be run under Cygwin. However, since they are Windows native, you need to use DOS path names. So changing “/cygdrive/c/” to “C:\” should fix your issue.

Hope this helps,

Dear Mat

this seems to work thank you.

do we have C99 support? I remember that there is a undocumented switch (?)

I need the function isfinite()

Thank you


Hi a_bra,

While the compiler is C99 compliant, Microsoft’s system math library is not. Hence, C99 math library functions such as “isinf” are not supported on Windows.


hi Mat

where can I find the latest pgi version for SUA?



sorry I meant for sfu, if there is any real difference

Hi a_bra,

For our SUA/SFU compilers, please send a note to PGI Customer Service ( and they should be able get you copy.

Note, that I believe the SFU libraries do support most C99 math functions including “isinf”,

  • Mat