Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FPM not working #2

Closed
glowiak opened this issue Dec 16, 2023 · 1 comment
Closed

FPM not working #2

glowiak opened this issue Dec 16, 2023 · 1 comment

Comments

@glowiak
Copy link

glowiak commented Dec 16, 2023

When trying to build with fpm (added as a dependency), the error shows up:

raylib.f90                             failed.
[ 33%] Compiling...
build/dependencies/fortran-raylib/src/raylib.f90:318:82:

  318 |     type(color_type), parameter, public :: LIGHTGRAY  = color_type(200, 200, 200, 255)
      |                                                                                  1
Error: Arithmetic overflow converting INTEGER(4) to INTEGER(1) at (1). This check can be disabled with the option ‘-fno-range-check’
compilation terminated due to -fmax-errors=1.
<ERROR> Compilation failed for object " build_dependencies_fortran-raylib_src_raylib.f90.o "
<ERROR> stopping due to failed compilation
STOP 1

How to fix that? Thanks in advance.

@glowiak glowiak closed this as completed Dec 16, 2023
@interkosmos
Copy link
Owner

Just have probably figured it out: you have to pass compiler flag -fno-range-check:

$ fpm build --profile release --flag "-fno-range-check"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants