PGI User Forum
 SearchSearch   MemberlistMemberlist     RegisterRegister   ProfileProfile    Log inLog in 

CUDA-x86.

unresolved externals in PGI Fortran for WIndows

 
Post new topic   Reply to topic    PGI User Forum Forum Index -> Licenses and Installation
View previous topic :: View next topic  
Author Message
Sanik



Joined: 26 Jan 2006
Posts: 22
Location: Russia

PostPosted: Tue Jan 29, 2008 12:11 am    Post subject: unresolved externals in PGI Fortran for WIndows Reply with quote

Hi,

I've met a problem when I was trying to build an application by PGI Fortran 7.1-2 Win32.

The short test case is below. Originally it was 416.gamess benchmark from SPEC CPU2006.

$ cat m.f
Code:

      PROGRAM BUG
      CALL HSSFUL
      END

$ cat hess.fppized.f
Code:

      SUBROUTINE HSSFUL
        CALL UPRCAS(WORD,8)
      RETURN
      END

$ cat frfmt.fppized.f
Code:

      SUBROUTINE UPRCAS(STRING,LENSTR)
        CHARACTER*(*) STRING
      RETURN
      END


>pgf95 frfmt.fppized.f m.f hess.fppized.f
frfmt.fppized.f:
m.f:
hess.fppized.f:
hess.fppized.obj : error LNK2019: unresolved external symbol _UPRCAS@8 referenced in function _HSSFUL@0
frfmt.fppized.exe : fatal error LNK1120: 1 unresolved externals

However I've observed that if the files are compiled with -Munix the application has been being built and no unresolved symbols appeared.

So, the first question is what does my problem look like?
And is it a proper way to use -Munix for such case?

Thanks,
Alexander
Back to top
View user's profile
Sanik



Joined: 26 Jan 2006
Posts: 22
Location: Russia

PostPosted: Tue Jan 29, 2008 12:13 am    Post subject: Reply with quote

Posted to wrong forum :(.
Please move to Programming and Compiling.
Back to top
View user's profile
hongyon



Joined: 19 Jul 2004
Posts: 551

PostPosted: Tue Jan 29, 2008 1:34 pm    Post subject: Reply with quote

Hi Alexander,

You will need to give a type for variable WORD in HSSFUL. UPRCAS expects character as an argument. In Fortran, if you don't specify the type, it will assum it is real.

For example,
SUBROUTINE HSSFUL
character*10 WORD
call UPRCAS(WORD,8)
return
END

Hongyon
Back to top
View user's profile
Display posts from previous:   
Post new topic   Reply to topic    PGI User Forum Forum Index -> Licenses and Installation All times are GMT - 7 Hours
Page 1 of 1

 
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