Thanks. Removing .a actually makes things worse, in that case the dll cannot even be opened, not just a linkage error anymore. So I guess the doc is correct with that.
I don’t know how to do it manually, but you could try building libcxxwrap-julia, and use its tests as a basis for your embedded code. It also contains some useful helpers to use Julia from C++, but it is not absolutely required of course. Link to the instructions:
I am not sure but I think those are the libraries you compile against and the output will be dependent on those DLL’s. Though I thought things will be linked statically.
I’d also suggest that documentation will include an example for the case the string isn’t trivial.
Namely what if someone wants to run a file?
Also, what about handling packages, Is it possible within Julia embedded?
Interesting to know. Can you elaborate more on how libcxxwrap-julia is used for exposure to C++? Would check it out.
Edit: this line is not immediate clear to me (sorry am not familiar with make file)
“… and configure the Julia_PREFIX option from the built-in CMake support.”
I followed the instruction and in Visual Studio’s CMakeSettings.json page, there is no such name as “Julia_PREFIX”?
Sorry, I have been neglecting my notifications a bit. What is meant by that sentence is that in the project CMake settings:
You can either set Julia_PREFIX to the root directory of your Julia installation or (maybe easier) Julia_EXECUTABLE to the full path of your Julia executable.
The most important one is probably JuliaFunction, which simplifies calling Julia functions from C++:
A shot in the dark here: the Embedding Julia page in the doc mentions the use of julia-config.jl on the posix side, but it doesn’t mention an equivalent on the MSVC side. Are we just missing some linker options here or something? It seems like the libraries are being found, so is this an issue of name-mangling or some such thing?