# Creating \*.dll with packageCompiler

**URL:** <https://discourse.julialang.org/t/creating-dll-with-packagecompiler/37811>\
**Category:** General Usage\
**Tags:** package-compiler\
**Created:** [April 18, 2020, 6:10pm UTC](https://discourse.julialang.org/t/creating-dll-with-packagecompiler/37811 "2020-04-18T18:10:10Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Owolf](https://avatars.discourse-cdn.com/v4/letter/o/bbce88/32.png) [@Owolf](https://discourse.julialang.org/u/Owolf)\
**Post date:** [April 18, 2020, 6:10pm UTC](https://discourse.julialang.org/t/creating-dll-with-packagecompiler/37811/1 "2020-04-18T18:10:10Z")

</div>

Hello,

I would like to create \*.dll file from my \*.jl code. Before I had packageCompiler version 0.6.4 and it works just perfectly. I only did something like this:

```julia
using PackageCompiler

build_shared_lib("test.jl", "test")

```

and it creates test.dll what works perfectly … of course with a lot of \*.dlls around but it is still good. However I lost my version v0.6.4 and now I am not able to add this package again. So I tried newest package version v1.1.1. However there is no function like build\_shared\_lib. Please could someone tell me if it is even possible to somehow create \*.dll file in Julia nowadays?  
I mean there is no sense to use Julia if there is no possibility of creating files as dll because of using Julia in already existing software. So I am getting really frustrated about this incompatibility and chaos in Julia packages. Please could anyone help me?

Thank you in advanced

---

<div class="post-metadata">

**Author:** ![kristoffer.carlsson](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/kristoffer.carlsson/32/22_2.png) [@kristoffer.carlsson](https://discourse.julialang.org/u/kristoffer.carlsson)\
**Post date:** [April 18, 2020, 7:09pm UTC](https://discourse.julialang.org/t/creating-dll-with-packagecompiler/37811/2 "2020-04-18T19:09:22Z")

</div>

First, you can always keep using 0.6.4:

```julia
pkg> add PackageCompiler@0.6.4

```

in the Pkg REPL and keep using it.

Please open an issue on the PackageCompiler repository with your exact use case and how you used to do it and I am sure we can figure something out.

---

<div class="post-metadata">

**Author:** ![Owolf](https://avatars.discourse-cdn.com/v4/letter/o/bbce88/32.png) [@Owolf](https://discourse.julialang.org/u/Owolf)\
**Post date:** [April 22, 2020, 7:13pm UTC](https://discourse.julialang.org/t/creating-dll-with-packagecompiler/37811/3 "2020-04-22T19:13:54Z")

</div>

Hi, thank you for answer. I created an issue there. Anyway I was able to run v0.6.4 version. But I found interesting issue. I created \*.dll file:

```julia
Base.@ccallable function test()::Cint
    return(2)
end

```

then create library:  
`build_shared_lib("C:/Users/Ondra/AppData/Local/Programs/Julia/Julia-1.4.1/builddirNeurons.jl", "NN")`

When I do it in Julia 64bit version I was able then to call it back in Julia:

`ccall((:test,"C:/Users/Ondra/AppData/Local/Programs/Julia/Julia-1.4.1/builddir/NN.dll"),Int32,(Int,),1)`

it simply execute the function.

But when I built library in 32bit Julia (it is actually what I would like to) and call it in Julia as above I got following error:

```julia
Exception: EXCEPTION_ACCESS_VIOLATION at 0x0 -- unknown function (ip: 00000000)
in expresion starting at REPL[1]:1 
unknown function(ip: 00000000) 
_test at C:\Users\Ondra\AppData\Local\Programs\Julia\Julia-1.4.1\builddir\NN.dll (unknown line).

```

Should I build it with some flags in 32bit version?
