Using PackageCompiler in windows

Hi, I tried building a shared library based on hello.jl found here.

It created the following files:

- 7z.dll
- libccalltest.dll
- libgfortran-4.dll
- libmpfr.dll
- libssh2.dll
- libwinpthread-1.dll
- BugpointPasses.dll
- libccolamd.dll
- libgit2.dll
- libopenblas64_.dll
- libssp-0.dll
- LLVM.dll
- hello.a
- libcholmod.dll
- libgmp.dll
- libopenlibm.dll
- libstdc++-6.dll
- LLVMHello.dll
- hello.dll
- libcolamd.dll
- libjulia.dll
- libpcre2-8.dll
- libsuitesparse_wrapper.dll
- zlib1.dll
- libamd.dll
- libdSFMT.dll
- libmbedcrypto.dll
- libpcre2-posix.dll
- libsuitesparseconfig.dll
- libatomic-1.dll
- libexpat-1.dll
- libmbedtls.dll
- libquadmath-0.dll
- libumfpack.dll
- libcamd.dll
- libgcc_s_seh-1.dll
- libmbedx509.dll
- libspqr.dll
- libuv-2.dll

however there are some issues when it comes to linking to this.

  1. It’s missing sys.dll which was required when I’ve previously embedded julia in my program.
  2. It contains no header files to define the signatures of the functions.
  3. It contains no import libraries to allow me to load the .dll

Sorry if some of the things here are obvious to others, I’ve always found linking to be a big challenge.

  1. hello.jl is your new sys.dll
  2. they don’t get generated automatically… It should be fairly easy though, since you only get functions exported via @ccallable and it should be relatlively straight forward to write a new macro, that registers the ccallable function signatures and generates a header file for them… Main problem will be conversions.
    You could also just embedd hello.dll much like in the embedding examples without any header files, with the added benefit to have julia functions ahead of time compiled.
  3. What do you expect exactly?
1 Like

Hi, thanks for your help!

  1. Thanks!
  2. So should I still copy the files inJulia-[ver-num]/include/julia to access the header files for functions such as jl_init()?
  3. I’ve only ever added dlls using the VS property window, or Qmake and I’ve always had to include an import static library. For example with Julia it’s libjulia.dll.a and libopenlibn.dll.a in [JuliaDir]\lib. I might be mistaken but as far as I’m aware this is a must have when using windows.