AcademySoftwareFoundation / AcademySoftwareFoundation/openvdb

[REQUEST] Improve documentation on building and linking for OpenVDB static library

Open
#938 5 comments 1 reaction 0 assignees View on GitHub
enhancement
Dominant language
C++
Stars
3.4k
Forks
774
Avg merge
3d 9h
Merged PRs (30d)
34

Description

### Is your feature request related to a problem? Please describe.

I have been trying to build OpenVDB as a static library and link it against one of my projects. There are bits and pieces in the issue tracker on what CMake variables to use for static linking and also there is `OPENVDB_CORE_STATIC` option while building OpenVDB. Still, I have been getting linking errors when I try to link against the "Hello World for OpenVDB" project in the cookbook. I am not sure if I am doing it correctly.

Here are the steps:

1. Uncheck `OPENVDB_CORE_SHARED`
2. Check `USE_STATIC_DEPENDENCIES`
3. Build OpenVDB
4. Setup CMake as described in the documentation (so that `find_package` works)
5. Compile hello world code: https://www.openvdb.org/documentation/doxygen/codeExamples.html#sHelloWorld

### Describe the solution you'd like

It would be nice to have a simple tutorial on building and working with OpenVDB static library in the documentation.

### Describe alternatives you've considered

Currently none.

### Additional context

N/A

Contributor guide

Open the contributing guide

Research direction

Start with the cookbook's Hello World example and the documented CMake setup for find_package, then review the OPENVDB_CORE_SHARED, OPENVDB_CORE_STATIC, and USE_STATIC_DEPENDENCIES options. Document a simple static-library build and linking tutorial that reproduces the example successfully without linking errors.

Written by the indexing model from the issue text.

Assessment

Tech stack
cmake, cpp
Domain
build-system, documentation
Issue type
Documentation
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.