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

example
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 optimise.cc
“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}/default.mk

PROJNAME = miscmaths

USRINCFLAGS = -I${INC_NEWMAT} -I${INC_BOOST} -I${INC_PROB} -I${INC_ZLIB}
USRLDFLAGS = -L${LIB_NEWMAT} -L${LIB_PROB} -L${LIB_ZLIB}

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 default.mk file

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

include ${FSLCONFDIR}/${FSLMACHTYPE}/systemvars.mk
include ${FSLCONFDIR}/${FSLMACHTYPE}/externallibs.mk
include ${FSLCONFDIR}/common/vars.mk
include ${FSLCONFDIR}/common/rules.mk



this is a snippet of a externallibs.mk file called


FSLEXTLIB=${FSLDIR}/extras/lib
FSLEXTINC=${FSLDIR}/extras/include

GD library

LIB_GD = ${FSLEXTLIB}
INC_GD = ${FSLEXTINC}/libgd

GDC library

LIB_GDC = ${FSLEXTLIB}
INC_GDC = ${FSLEXTINC}/libgdc




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

Thanks
a_bra

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,
Mat

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

a_bra

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.

Sorry,
Mat

hi Mat

where can I find the latest pgi version for SUA?

thanks

a_bra

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 (trs@pgroup.com) and they should be able get you copy.

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

  • Mat