- Marcar como nuevo
- Favorito
- Suscribir
- Silenciar
- Suscribirse a un feed RSS
- Resaltar
- Imprimir
- Informe de contenido inapropiado
I have old fortran code that I have compiled and linked successfully in Linux with IFORT using
ifort -O2 -i8 -r8 -assume byterecl -c xxx.f90
ifort -O2 -i8 -r8 -assume byterecl -c yyy.f90
ifort -O2 -i8 -r8 -assume byterecl xxx.o yyy.o -o MyProg
I have now made a project in Visual Studio 2022 in WIN10 and .f90 code compile successfully, the linking however fails. I could figure out the directive -assume byterecl in VS, but I'll appreciate help on how to specify -O2 -i8 -r8
I am a novice with VS, so please pardon my ignorance.
Assistance will be highly appreciated.
Kind regards
- Marcar como nuevo
- Favorito
- Suscribir
- Silenciar
- Suscribirse a un feed RSS
- Resaltar
- Imprimir
- Informe de contenido inapropiado
-O2 is the default from the command line. The Windows equivalent is /O2 or property Fortran > Optimize > Optimization > Maximize speed. This is the default in a Release configuration.
-i8 and -r8 are bad ideas and you shouldn't use them. If you must, the Windows equivalents are /integer_size:64 and /real_size:64. In Visual Studio these can be found on the Fortran > Data property page, selecting 8 for Default integer kind and Default real kind.
Enlace copiado
- Marcar como nuevo
- Favorito
- Suscribir
- Silenciar
- Suscribirse a un feed RSS
- Resaltar
- Imprimir
- Informe de contenido inapropiado
-O2 is the default from the command line. The Windows equivalent is /O2 or property Fortran > Optimize > Optimization > Maximize speed. This is the default in a Release configuration.
-i8 and -r8 are bad ideas and you shouldn't use them. If you must, the Windows equivalents are /integer_size:64 and /real_size:64. In Visual Studio these can be found on the Fortran > Data property page, selecting 8 for Default integer kind and Default real kind.
- Marcar como nuevo
- Favorito
- Suscribir
- Silenciar
- Suscribirse a un feed RSS
- Resaltar
- Imprimir
- Informe de contenido inapropiado
Thank you very much for your very fast response. I take note of the -i8 and -r8, I will compile/link without these two compiler directives. Part of the code that I use is legacy stuff, programmed in the 1960's. The instruction that I received was to use -i8 and -r8. I have now checked the source code again, I have converted the old Fortran to f90 and Implicit None was added, so all variables are now properly declared, all reals are kind=8.
Kind regards and thanks again, Steph

- Suscribirse a un feed RSS
- Marcar tema como nuevo
- Marcar tema como leído
- Flotar este Tema para el usuario actual
- Favorito
- Suscribir
- Página de impresión sencilla