Trying to bind C's rand but i cant get it to work

See your other post

Please don’t forget the asinine need with the not-yet-fully modern Fortran to include the implicit none statement in all your program units and each of your interface bodies! :sob: Or if you’re really brave, eschew this relic but go with compiler options such as -fimplicit-none though I wouldn’t recommend to be this daring yet in production code.

module cfunctions
   use, intrinsic :: iso_c_binding, only : c_int
   implicit none
   interface
      function c_rand() result(r) bind(C, name="rand")
         import :: c_int
         implicit none
         ! function result
         integer(c_int) :: r
..