DEC runtime library for Fortran in Visual studio 2022

  • Thread starter Thread starter BvU
  • Start date Start date
  • Tags Tags
    Fortran Runtime
Join the discussion
Ask a follow-up here, or get your own question answered by working scientists, mathematicians and engineers — people, not an autocomplete.
Real named experts · corrections over time · the nuance an AI answer skips
11 replies · 2K views
Messages
16,219
Reaction score
4,934
trying to revive some stuff from 40 years ago.
Found I could download and install Intel Fortran which seems to be a descendant from an old DEC VMS friend. Even managed to get it 'integrated' into Visual Studio 2022 (somewhat; haven't got a decent help or debug facility running yet... and no idea how to hook up runtime libraries).

Overwhelming experience; and a far cry from DCL
$ For aap | $ Link aap | $ Run aap

But I'm sure there are good reasons for all this progress :smile:

My current issue:

Need help to resolve symbols like STR$... and LIB$... that were in the runtime library

(e.g. :
Severity Code Description File
error LNK2019: unresolved external symbol STR$UPCASE referenced in function STR$UPCASE.void CMR$DEFAULT.obj

For the debugging and help there are some clues, but I quickly find myself drowning in side issues in a world that seems to abhor the word fortran :rolleyes:

##\ ##
 
Last edited:
on Phys.org
BvU said:
... I quickly find myself drowning in side issues in a world that seems to abhor the word fortran
The name was FORTRAN, not fortran, because only upper case letters were used, up to and including F77.

You needed to know how many 6 bit characters you could pack into a double precision floating point variable on your machine. That will now cause side issues.
 
Great, thanks.
Now: what do I have to do to resolve these LNK2019 errors ?

I added /f77rtl in Project | Properties | Fortran as additional options - makes no difference

Adding /f77rtl to the linker command line gives
warning LNK4044: unrecognized option '/f77rtl'; ignored LINK
Makes sense, but I'm still stuck with unresolved externals


I installed w_ifort_runtime_p_2024.1.0.968.exe but can't find where it puts the stuff.

(anyone ?)

Had good fun and success with this setup in another thread (with no LIB$... etc) so the whole machinery seems to work OK....

Frustrating
 
BvU said:
I quickly find myself drowning in side issues in a world that seems to abhor the word fortran :rolleyes:
The world does not abhor Fortran, but the language has changed in the last 40 years (although not much in the last 35 years).

If you want to use strings see https://fortran-lang.org/en/learn/quickstart/arrays_strings/#character-strings

You also (I note from some of your other posts) need to understand IEEE 754 and its near universal implementation in everything from supercomputers to microcontrollers. Many of the things you used to have to worry about on DEC hardware are no longer relevant.
 
Thanks, and I know that underneath a whole lot of newfangled stuff some sturdy fortran is actually doing the work.

I also have done quite a lot of character stuff in fortran on VAX and Alpha. And their architecture handbooks (close enough to IEEE 754) are within reach right where I am sitting.

But at the moment I am interested in dealing with these:

1715344784228.png


Can't suppress the feeling there is a simple solution. If I get frustrated just a little more I will embark on simply writing them from scratch :doh:

:smile:
 
Let's describe the problem in more accurate terms.

You have Fortran code from 40 years ago that used non-portable extensions (the "blue pages"). Now you have discovered this code is, exactly as promised, non-portable.

I understand why you don't like this situation, but it shouldn't be a surprise.

I see three options:
  1. Keep trying other compilers, hoping they have implemented these functions. Your best bet will be with commercial compilers, like PGI or IBM.
  2. Figure out what these functions do, and write code that does the same thing with the same name and link it in.
  3. Figure out what these functions do and re-write the application code to do this some other way so as to use only portable code.
I know none of these are appealing, but unfortunately, it is unlikely to find a switch "--compile-old-incompatible-code-correctly".
 
Reply
  • Like
Likes   Reactions: Klystron, FactChecker, BvU and 1 other person