Coder Social home page Coder Social logo

OpenVDB 4.0.0: error: no matching function for call to ‘std::vector<std::shared_ptr<openvdb::v4_0_0::GridBase> >::push_back(openvdb::v4_0_0::GridBase::ConstPtr)’ m_grids->push_back(grid.copyGrid()); about openvdb HOT 4 CLOSED

academysoftwarefoundation avatar academysoftwarefoundation commented on May 18, 2024
OpenVDB 4.0.0: error: no matching function for call to ‘std::vector >::push_back(openvdb::v4_0_0::GridBase::ConstPtr)’ m_grids->push_back(grid.copyGrid());

from openvdb.

Comments (4)

OpenVDB-DevTeam avatar OpenVDB-DevTeam commented on May 18, 2024

This is probably due to the API change to Grid::copyGrid() in OpenVDB 4.0.0, which addressed a const-correctness issue. The simplest fix would be to add a const_cast (e.g., m_grids->push_back(const_cast<GridBase&>(grid).copyGrid())). There might be other, possibly better solutions, but that would be for the author of that Blender code to decide.

from openvdb.

dracwyrm avatar dracwyrm commented on May 18, 2024

Thanks for the reply. I guess I had something different in mind with the ABI 3 Compatibility in making it the same interface for programs, but that's API. XD

from openvdb.

OpenVDB-DevTeam avatar OpenVDB-DevTeam commented on May 18, 2024

In ABI 3 compatibility mode you should get the old behavior, but it doesn't look like you're building with ABI 3 compatibility. Keep in mind that OpenVDB is mostly header code, so macros like OPENVDB_3_ABI_COMPATIBLE need to be defined when you compile any code that includes OpenVDB headers, not just when you compile the OpenVDB library.

from openvdb.

dracwyrm avatar dracwyrm commented on May 18, 2024

Compiling Blender with the added gcc command line of "-DOPENVDB_3_ABI_COMPATIBLE" worked perfectly. Thanks for mentioning that the programs including OpenVDB need to have that set as well. I didn't need to modify the Blender code at all.

Sorry if I missed the mentioning that programs including OpenVDB need to enable ABI 3 macro in the documentation. If it's not documented, can it be mentioned somewhere?

Thanks. :)

from openvdb.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.