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

Example code compilation fails. #126

Closed
norouzzadeh opened this issue Jan 16, 2017 · 2 comments
Closed

Example code compilation fails. #126

norouzzadeh opened this issue Jan 16, 2017 · 2 comments

Comments

@norouzzadeh
Copy link

norouzzadeh commented Jan 16, 2017

I have compiled and installed the openvdb latest commit in Ubuntu 16.04 with boost 1.58 successfully.
During the compilation of any cookbook examples, i get the following error:

In function openvdb::v4_0_1::math::AffineMap::postRotate(double, openvdb::v4_0_1::math::Axis) const': /usr/local/include/openvdb/math/Maps.h:619: undefined reference to openvdb::v4_0_1::math::simplify(std::shared_ptropenvdb::v4_0_1::math::AffineMap)'

The simplify function in OpenVDB library is defined as:
openvdb::v4_0_1::math::simplify(boost::shared_ptropenvdb::v4_0_1::math::AffineMap)

But in the Maps.h it is defined as
OPENVDB_API SharedPtr simplify(SharedPtr affine);

where
template using SharedPtr = std::shared_ptr;

I think that, it shall be declared as boost::shared_ptr instead of std::shared_ptr.

@danrbailey
Copy link
Contributor

Hi @norouzzadeh,

I believe the issue is that you're compiling the OpenVDB library with ABI=3 and codebook examples with ABI=4.

SharedPtr is actually defined as follows:

  • ABI=3 boost::shared_ptr
  • ABI=4 std::shared_ptr

Provided that you use the same ABI for both (the library and the binary), they should be compatible with each other.

@norouzzadeh
Copy link
Author

Hi @danrbailey ,

That's right. Thanks a lot.

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

2 participants