Minimal working example mixed project Julia and C on Windows

I am looking for a simple, minimal working example for a Julia project that includes some C code as part of a project. I need a project to compile C code into a * .dll file, and then there is Julia code that can successfully call a function from this * .dll on Windows.

I have a lot of problems getting this to work on Windows, and it would be really useful to start with some example that I know really works and fix the problem of why my larger project is not working.

My use case calls the portaudio library for weak presentation of sounds using a multi-threaded lock model. In fact, it is impossible to write in julia at this stage, which I know about: I really need a system-level language such as C. But I would like the rest of the project to be in Julia.

+5
source share
2 answers

This blog post contains an almost minimal working example. He compiles a small linker code in GSL, and then writes about 10 lines of Julia to use it. It even in this space shows how to pass a specific Julia function to C.

+4
source

Source: https://habr.com/ru/post/1264896/


All Articles