ID 395193 - [DDImage] Undefined operator<< symbols for Vector4, Vector3, Vector2 and Matrix3

Follow

Problem summary
The following code compiles but fails at link time:

#include <DDImage/Vector4.h>
...
DD::Image::Vector4 v;
...
std::cerr << v << std::endl;

Note that Vector3 and Matrix3 suffer from the same issue. Vector2 also declares a friend operator<< however there is no current definition to export.


This can make it difficult to print diagnostics information using the DDImage vector types.


Customer reported version
Nuke 11.3v1


Customer reported platform

Linux


Steps to reproduce

A plugin containing a method with with the following code should link without errors:

  Matrix3 m3;
  Matrix4 m4;
  Vector2 v2;
  Vector3 v3;
  Vector4 v4;
  std::cout << m4 << std::endl;
  std::cout << m3 << std::endl;
  std::cout << v2 << std::endl;
  std::cout << v3 << std::endl;
  std::cout << v4 << std::endl;


Expected behaviour
The code should link without errors.


Actual behaviour
The code compiles but fails at link time.


Reproduced by support
This bug was reproduced by developers.

    We're sorry to hear that

    Please tell us why