# Using compiled Fortran shared library

**URL:** https://discourse.julialang.org/t/using-compiled-fortran-shared-library/15672
**Category:** New to Julia
**Tags:** fortran
**Created:** [September 29, 2018, 6:43pm UTC](https://discourse.julialang.org/t/using-compiled-fortran-shared-library/15672 "2018-09-29T18:43:24Z")
**Posts on this page:** 1
**Showing post:** 3

<div class="post-metadata">

### Author: ![Mattriks](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mattriks/32/351_2.png) [@Mattriks](https://discourse.julialang.org/u/Mattriks)
#### Post date: [September 29, 2018, 10:29pm UTC](https://discourse.julialang.org/t/using-compiled-fortran-shared-library/15672/3 "2018-09-29T22:29:36Z")

</div>

There are some simple examples here:

> [@Calling fortran function](https://discourse.julialang.org/t/calling-fortran-function/2288/9):
>
> Also here is a simple example: subroutine foo1(n,x,y) integer\*4, intent(in) :: n integer\*4, intent(in), dimension(n) :: x integer\*4, intent(out), dimension(n) :: y y = 2\*x end subroutine foo1 subroutine foo2(n,x,y) integer\*8, intent(in) :: n integer\*8, intent(in), dimension(n) :: x integer\*8, intent(out), dimension(n) :: y y = 2\*x end subroutine foo2 Compile into a shared library, and then in Julia, e.g.: ftest = Libdl.dlopen(…

---

_[View the full topic](https://discourse.julialang.org/t/using-compiled-fortran-shared-library/15672)._
