title: How to access a PRIVATE PUBLIC interface in Fortran?
body: <p>I have the following code:</p>
  
  <pre><code>SUBROUTINE test
  USE mp, only: mp_bcast
  integer :: B = 0
  logical :: A
  ...
  CALL mp_bcast (A, B)
  END SUBROUTINE test
  </code></pre>
  
  <p>The problem is that the module mp goes as follow:</p>
  
  <pre><code>MODULE mp
  IMPLICIT NONE
  PRIVATE
  
  PUBLIC :: mp_bcast
  !
  INTERFACE mp_bcast
    MODULE PROCEDURE mp_bcast_i1, mp_bcast_r1, mp_bcast_c1, mp_bcast_l  ! etc
  END INTERFACE
  
  SUBROUTINE mp_bcast_l(msg,source,gid)
    IMPLICIT NONE
    LOGICAL :: msg
    INTEGER, INTENT(IN) :: source
    INTEGER, INTENT(IN) :: gid
  END SUBROUTINE mp_bcast_l
  </code></pre>
  
  <p>It is private but the interface is public. I cannot modify the module mp (belong to another software I want to interface to).</p>
  
  <p>I use the following Makefile:</p>
  
  <pre><code>MODS = ../../Modules_mp/libmod.a
  prog : prog.o test.o $(LD) $(LDFLAGS) -o prog.x $(MODS)
  </code></pre>
  
  <p>This way I though I could access the public interface in the module libmod.a that contains the module 'mp'. 
  It does not work and I get this error:</p>
  
  <pre><code>test.f90(38): error #6285: There is no matching specific subroutine for this generic subroutine call.   [MP_BCAST]
    CALL mp_bcast (A,B)
  -------^
  </code></pre>
  
  <p>What would be the correct way to proceed?</p>
  
  <p>Thank you, </p>
  
  <p>Samuel</p>