PGI User Forum
 SearchSearch   MemberlistMemberlist     RegisterRegister   ProfileProfile    Log inLog in 

Free OpenACC Course

problems with include paths
Goto page 1, 2  Next
 
Post new topic   Reply to topic    PGI User Forum Forum Index -> Programming and Compiling
View previous topic :: View next topic  
Author Message
a_bra



Joined: 11 Nov 2004
Posts: 20

PostPosted: Fri Jan 09, 2009 4:46 am    Post subject: problems with include paths Reply with quote

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
Back to top
View user's profile
mkcolg



Joined: 30 Jun 2004
Posts: 6616
Location: The Portland Group Inc.

PostPosted: Fri Jan 09, 2009 10:12 am    Post subject: Reply with quote

Hi a_bra,

Quote:
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
Back to top
View user's profile
a_bra



Joined: 11 Nov 2004
Posts: 20

PostPosted: Fri Jan 09, 2009 10:52 am    Post subject: C 99 support Reply with quote

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
Back to top
View user's profile
mkcolg



Joined: 30 Jun 2004
Posts: 6616
Location: The Portland Group Inc.

PostPosted: Fri Jan 09, 2009 1:21 pm    Post subject: Reply with quote

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
Back to top
View user's profile
a_bra



Joined: 11 Nov 2004
Posts: 20

PostPosted: Sun Jan 11, 2009 10:12 am    Post subject: pgi for SUA Reply with quote

hi Mat

where can I find the latest pgi version for SUA?

thanks

a_bra
Back to top
View user's profile
Display posts from previous:   
Post new topic   Reply to topic    PGI User Forum Forum Index -> Programming and Compiling All times are GMT - 7 Hours
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © phpBB Group