# Linking against Julia's internal openBLAS

**URL:** <https://discourse.julialang.org/t/linking-against-julias-internal-openblas/2409>\
**Category:** General Usage\
**Tags:** question\
**Created:** [March 2, 2017, 7:47pm UTC](https://discourse.julialang.org/t/linking-against-julias-internal-openblas/2409 "2017-03-02T19:47:23Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![TsurHerman](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tsurherman/32/1234_2.png) [@TsurHerman](https://discourse.julialang.org/u/TsurHerman)\
**Post date:** [March 2, 2017, 7:47pm UTC](https://discourse.julialang.org/t/linking-against-julias-internal-openblas/2409/1 "2017-03-02T19:47:23Z")

</div>

I have C code that I want to compile to a dll (windows platform) so I can ccall it from julia.  
The C code is dependent on openBLAS .

I want to link it against libopenblas64\_.dll that is present in the julia bin\ directory.  
Is this possible?

---

<div class="post-metadata">

**Author:** ![tkelman](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tkelman/32/692_2.png) [@tkelman](https://discourse.julialang.org/u/tkelman)\
**Post date:** [March 3, 2017, 12:42am UTC](https://discourse.julialang.org/t/linking-against-julias-internal-openblas/2409/2 "2017-03-03T00:42:15Z")

</div>

Yeah, should be possible. We build suitesparse and arpack dll’s that link to openblas just fine. What have you tried? Keep in mind that because we use the (somewhat nonstandard) 64-bit integer interface in openblas, we have all the internal function names renamed (`64_` appended) in the default build on 64-bit Julia.

---

<div class="post-metadata">

**Author:** ![vchuravy](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/vchuravy/32/8_2.png) [@vchuravy](https://discourse.julialang.org/u/vchuravy)\
**Post date:** [March 3, 2017, 6:42am UTC](https://discourse.julialang.org/t/linking-against-julias-internal-openblas/2409/3 "2017-03-03T06:42:23Z")

</div>

MXNet.jl is linked against the OpenBLAS that is distributed with Julia on `Pkg.build`. [https://github.com/dmlc/MXNet.jl/blob/17a544205b22d7092f07690816c000a25e43b0ef/deps/build.jl#L55-L91](https://github.com/dmlc/MXNet.jl/blob/17a544205b22d7092f07690816c000a25e43b0ef/deps/build.jl#L55-L91) might be a starting point.

---

<div class="post-metadata">

**Author:** ![TsurHerman](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tsurherman/32/1234_2.png) [@TsurHerman](https://discourse.julialang.org/u/TsurHerman)\
**Post date:** [March 3, 2017, 2:54pm UTC](https://discourse.julialang.org/t/linking-against-julias-internal-openblas/2409/4 "2017-03-03T14:54:46Z")

</div>

it is a windows system I need a .def or .lib file that define the function stubs for visual studio

Edit:  
I will try and build it with mingw and gcc , for that .lib file can be skipped
