Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inclue Dirs #451

Open
incardon opened this issue Dec 7, 2019 · 0 comments
Open

Inclue Dirs #451

incardon opened this issue Dec 7, 2019 · 0 comments

Comments

@incardon
Copy link

incardon commented Dec 7, 2019

I am new to Julia (1 day) and I am looking see how to wrap the library we have (c++) in julia

Unfortunately I encountered a problem I was able to solve only in a dirty way.

I used a file that try to load the library from C++

using StaticArrays
using Cxx

#other stuffs

addHeaderDir("/home/i-bird/HDF5/include", kind=C_User)
addHeaderDir("/home/i-bird/HDF5/include",` kind=C_System)

#other stuffs

cxx""" #define DISABLE_ALL_RTTI """
cxx""" #include "Vector/vector_dist.hpp" """

addHeaderDir("/home/i-bird/HDF5/include", kind=C_User)
addHeaderDir("/home/i-bird/HDF5/include", kind=C_System)

I cutted to the essential. When I try to load it i get

In file included from /usr/local/openfpm_sparse_cl/openfpm_io/include/HDF5_wr/HDF5_writer.hpp:26:
/usr/local/openfpm_sparse_cl/openfpm_io/include/HDF5_wr/HDF5_writer_vd.hpp:64:3: error: use of undeclared identifier 'H5Pset_fapl_mpio'; did you mean 'H5Pset_fapl_core'?
                H5Pset_fapl_mpio(plist_id, comm, info);
                ^~~~~~~~~~~~~~~~
                H5Pset_fapl_core
/usr/lib/gcc/x86_64-redhat-linux/8/../../../../include/H5FDcore.h:32:15: note: 'H5Pset_fapl_core' declared here
H5_DLL herr_t H5Pset_fapl_core(hid_t fapl_id, size_t increment,

So the problem of this error come from the fact that is taking the system wide installation of HDF5 library instead of the custom one in "/home/i-bird/HDF5/include". It seems the problem is priority of the folder because I used addHeaderDir for other headers and they work

The only dirty way to fix for now (prioritize "/home/i-bird/HDF5/include" ) I founs is going into initialization.ij and change to

const GlobalHeaders = insert!(collectAllHeaders(nostdcxx),1,("/home/i-bird/HDF5/include",Int32(1)))

Is there a better way ?

@incardon incardon changed the title Inclued Dirs Inclue Dirs Dec 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant