Skip to content

Commit 0452d6e

Browse files
committed
Explicitly disable the lookup table generation as two namespaced
versions will otherwise conflict, as the lookuptable itself is extern "C" so not namespaced. Signed-off-by: Jeff Lait <jlait@andorra.sidefx.com>
1 parent 3f8b6f3 commit 0452d6e

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

openvdb/openvdb/math/Half.h

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,15 @@ namespace OPENVDB_VERSION_NAME {
200200
namespace math {
201201
namespace internal {
202202

203+
// Use of lookup table is explicitly suppressed and the generation of
204+
// a lookup table is suppressed. This is required because we namespace
205+
// our type, but the lookup table is extern "C" and lacks a namespace.
206+
// Thus any attempt to link two versions of OpenVDB with different
207+
// namespaces will clash due to redefinition with a new type.
208+
// The default was not to use a lookup table.
209+
#undef IMATH_HALF_USE_LOOKUP_TABLE
210+
#define IMATH_HALF_NO_LOOKUP_TABLE
211+
203212
//-------------------------------------------------------------------------
204213
// Limits
205214
//

0 commit comments

Comments
 (0)