Comments (9)
What Version of GNU Fortran are you using? I have tested the source code with gfortran7 and gfortran8, both on FreeBSD 11.
from fortran-sdl2.
@interkosmos wrote:
What Version of GNU Fortran are you using? I have tested the source code with gfortran7 and gfortran8, both on FreeBSD 11.
On GNU/Linux
:
$ gfortran -v
Using built-in specs.
COLLECT_GCC=gfortran
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/7/lto-wrapper
OFFLOAD_TARGET_NAMES=nvptx-none
OFFLOAD_TARGET_DEFAULT=1
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu 7.3.0-16ubuntu3' --with-bugurl=file:///usr/share/doc/gcc-7/README.Bugs --enable-languages=c,ada,c++,go,brig,d,fortran,objc,obj-c++ --prefix=/usr --with-gcc-major-version-only --with-as=/usr/bin/x86_64-linux-gnu-as --with-ld=/usr/bin/x86_64-linux-gnu-ld --program-suffix=-7 --program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-libmpx --enable-plugin --enable-default-pie --with-system-zlib --with-target-system-zlib --enable-objc-gc=auto --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-offload-targets=nvptx-none --without-cuda-driver --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 7.3.0 (Ubuntu 7.3.0-16ubuntu3)
On MSYS2/MINGW64
:
$ gfortran -v
Using built-in specs.
COLLECT_GCC=C:\msys64\mingw64\bin\gfortran.exe
COLLECT_LTO_WRAPPER=C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.2.0/lto-wrapper.exe
Target: x86_64-w64-mingw32
Configured with: ../gcc-8.2.0/configure --prefix=/mingw64 --with-local-prefix=/mingw64/local --build=x86_64-w64-mingw32 --host=x86_64-w64-mingw32 --target=x86_64-w64-mingw32 --with-native-system-header-dir=/mingw64/x86_64-w64-mingw32/include --libexecdir=/mingw64/lib --enable-bootstrap --with-arch=x86-64 --with-tune=generic --enable-languages=ada,c,lto,c++,objc,obj-c++,fortran --enable-shared --enable-static --enable-libatomic --enable-threads=posix --enable-graphite --enable-fully-dynamic-string --enable-libstdcxx-filesystem-ts=yes --enable-libstdcxx-time=yes --disable-libstdcxx-pch --disable-libstdcxx-debug --disable-isl-version-check --enable-lto --enable-libgomp --disable-multilib --enable-checking=release --disable-rpath --disable-win32-registry --disable-nls --disable-werror --disable-symvers --with-libiconv --with-system-zlib --with-gmp=/mingw64 --with-mpfr=/mingw64 --with-mpc=/mingw64 --with-isl=/mingw64 --with-pkgversion='Rev1, Built by MSYS2 project' --with-bugurl=https://sourceforge.net/projects/msys2 --with-gnu-as --with-gnu-ld
Thread model: posix
gcc version 8.2.0 (Rev1, Built by MSYS2 project)
The problem is not the compiler but the option, -std=fXXXX
, to test if the code if conform to the standard. Your code builds without that option but fails with that option. Your Makefile
does not use that option...
So your code is not conform to the f2008
standard. please, use -std=f2008
and see if your code builds..
I think you have to take care of this issue because your GitHub page says:
Interface to SDL 2 for Fortran 2003/2008/2018
from fortran-sdl2.
Using the -std=fXXXX
compiler flag is little tricky, because then you are not allowed to use compiler specific extensions, which are, for instance, provided by the GNU Fortran compiler. Historically, many compilers added special extensions, which are not covered by the official ISO standard. Therefore, using the -std=f2008
just guarantees that the source code complies with the Fortran 2008 ISO standard.
But anyway, thank you for your hints and comments!
from fortran-sdl2.
I have removed compiler-specific calls from the examples. They now compile with the -std=f2008
flag.
from fortran-sdl2.
Hi @interkosmos, I know what extensions are.. usually they become standard in a future standard but with a better look!
When I used g77
it was possible to do a sort of iso c binding
and people (and me) did that or viceversa (think to the famous CERNLIB
and its cfortran), but thanks to the ISO_C_BINDING
standard things are a lot simpler.
In any case Interface to SDL 2 for Fortran 2003/2008/2018
makes you think the code have to obey some standard.
from fortran-sdl2.
Obviously I spike about f2008
and not f2018
because it does not seem ready yet...
from fortran-sdl2.
The phrase “Interface to SDL 2 for Fortran 2003/2008/2018“ just states that the source code is written in modern Fortran, in contrast to ancient FORTRAN. :)
from fortran-sdl2.
BTW, music.ogg
is from Rigoletto, G. Verdi. The singer is Pavarotti (aka BigLuciano). I would suggest to rename that file in BigLuciano.ogg
and the window, that music
app opens, should contain the text explaining what it is: an aria from Verdi's Rigoletto, sung by BigLuciano Ah! inseparabile d'amore
Thanks... for the patience.
from fortran-sdl2.
Yes, I know: È il sol dell´ anima. :) It serves just as an example, as I had no better music file on hand.
from fortran-sdl2.
Related Issues (19)
- The Makefile doesn't work HOT 4
- Add Set/Get viewport HOT 3
- Incorrect reference to C procedure HOT 1
- All is broken now HOT 4
- About Final Renaming HOT 1
- Error compiling info example HOT 1
- Segmentation fault for "voxel" example HOT 19
- Some warning with gfortran 10.1 HOT 7
- underscores in function names HOT 2
- catching when sdl_surface (or other types) not defined HOT 2
- SDL2_gfx support HOT 2
- Add the primitive to draw points/pixel HOT 3
- Quitting with ESC key HOT 18
- Still warnings after last upgrade HOT 3
- About the SDLK constants HOT 5
- Wrong result with SDLK_SCANCODE_MASK HOT 8
- The mouse wheel does not work on macOS HOT 1
- The `msgbox` example crashes HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fortran-sdl2.