CxxWrap on windows

I am trying to use CxxWrap on windows.
I am trying to reproduce the “hello world” on the github page.

1/ where is #include "jlcxx/jlcxx.hpp" ?
2/ how do I compile to a shared library? ( i have gcc)
3/ does anyone have a step by step tutorial for windows? The documentation seem a bit light for beginners.

Thank you

1 Like

Summoning @barche

Hi @gitboy16, sorry for the late reaction.

There are two methods:

  1. Use Docker and a dev container, as described here: GitHub - barche/cxxwrap-juliacon2020: Tutorial files for the JuliaCon 2020 CxxWrap workshop (note that the docker image probably needs updating)
  2. Use MSVC Community Edition to check out libcxxwrap-julia from git and build using CMake. This is currently broken, I’m trying to fix it here: Fix headers for MSVC by barche · Pull Request #91 · JuliaInterop/libcxxwrap-julia · GitHub
1 Like

Thank you @barche for the link
I will try this. Your link mentions Julia 1.4. Will it work with Julia 1.7?
Julia 1.7 is the only one I can use currently as it has git flag which is configurable to install package that previous version don’t have and is necessary to install packages behind company firewall.

I tried the MSVC method with Julia 1.7, but there are many missing definitions, so I still have to look for a workaround. The VScode devcontainer method should work with any Julia version. Which method you need/prefer also depends on the library you want to wrap (i.e. is it easier to build that library with MSVC or GCC?)

I really would like to use Boost. Thank you.

I have updated the VScode devcontainer, see: GitHub - barche/cxxwrap-template

This is based on the official Julia Docker image, so it is still on 1.6 unfortunately.


If anyone sees the above thread, please note that @Ronis_BR answers some of my original questions post in the following discussion:

Thanks again to @Ronis_BR and @Gnimuc for improving my knowledge.