JuliaInterop / libcxxwrap-julia

C++ library for backing CxxWrap.jl
Other
79 stars 43 forks source link

Can't compile examples #50

Closed nlw0 closed 4 years ago

nlw0 commented 4 years ago

I'm trying to use CxxWrap, and cannot compile the examples. First of all for cmake to work with the example I had to change the install lines to


LIBRARY DESTINATION lib ${CMAKE_INSTALL_LIBDIR}
RUNTIME DESTINATION bin ${CMAKE_INSTALL_BINDIR}```

Possibly unrelated to that, even if cmake runs when compiling I get:

```/home/user/src/libcxxwrap-julia/examples/basic_types.cpp:3:10: fatal error: jlcxx/jlcxx.hpp: No such file or directory
 #include "jlcxx/jlcxx.hpp"```

I tried both `cmake -DJlCxx_DIR=/home/user/src/libcxxwrap-julia-build ..`, which says the variable was not used, and `CMAKE_PREFIX_PATH=/home/user/src/libcxxwrap-julia-build cmake ..`. What am I missing?
nlw0 commented 4 years ago

Don't want to open a new issue, I'm basically just trying to get a simple example to run. Now I'm following testlib-builder example, and this is what I get...

julia: symbol lookup error: build/lib/libtestlib.so: undefined symbol: _ZN5jlcxx19FunctionWrapperBaseC2EPNS_6ModuleESt4pairIP14_jl_datatype_tS5_E
nlw0 commented 4 years ago

Alright, I finally managed. It was just that I pulled the master branch from github instead of a proper release (v.0.6.6). I would suggest you leave the latest release as the default branch, so that people coming here from the CxxWrap.jl documentation check out the repo in a more appropriate state.

nlw0 commented 4 years ago

Not a real issue, closing...

barche commented 4 years ago

Hmm, not sure what the issue was here, both the master and latest release always built fine on all my machines.

nlw0 commented 4 years ago

I had mismatched versions.