JuliaData / Feather.jl

Read and write feather files in pure Julia
https://juliadata.github.io/Feather.jl/stable
Other
109 stars 27 forks source link

Attempt to use the CxxWrap package to build libfeather wrappers #3

Closed dmbates closed 8 years ago

dmbates commented 8 years ago

With https://github.com/JuliaStats/Feather.jl/commit/60e0cb1659dc574beecb14dc4499a2c72c59a619 I get a std::runtime_error from

using CxxWrap, Feather
wrap_modules(Pkg.dir("Feather","deps","usr","lib","libfeatherjl.so"))

The error is

Type St10unique_ptrIN7feather11TableReaderESt14default_deleteIS1_EE has no Julia wrapper

and originates in

cxx_wrap::FunctionWrapper<std::unique_ptr<feather::TableReader, std::default_delete<feather::TableReader> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&>::return_type() const

Can you advise me, @barche?

I am also struggling with the ./deps/build.jl file but I will deal with that separately.

barche commented 8 years ago

I just opened a pul request for this, the basic problem was that you needed to add the TableReader type before attempting to use it as a function return type, since everything in a CxxWrap module happens in the order stated between JULIA_CPP_MODULE_BEGINand JULIA_CPP_MODULE_END. I will update the CxxWrap docs to make this clearer.

dmbates commented 8 years ago

@barche That worked. Thank you.