wolftype / versor

Versor Geometric Algebra Library
wolftype.github.io/versor/devel/html/
290 stars 47 forks source link

vsr::cga2D::circle inclusion leads to multiple symbols in linking #12

Closed weshoke closed 8 years ago

weshoke commented 8 years ago

If you use vsr::cga2D::circle and similar functions defined in vsr_cga2D_types.h in multiple source files, you'll get a C++ linking error about mulitply defined symbols.

wolftype commented 8 years ago

Following the vsr_cga3d_op.h pattern, i’ve just pushed a vsr_cga2d_op.h file which encapsulates such helper functions in a vsr::cga2D::Construct class.

usage:

#include “vsr_cga2D.h”

using namespace vsr;
using namespace vsr::cga2D;

float x = 0; float y = 0; float r =1;

auto point = Construct::point(x,y);
auto circle = Construct::circle(x,y,r);

Taking a look at vsr_cga3D_op and making something similar for vsr_cga2D_op would be a nice contribution . . . :)

On Jan 15, 2016, at 7:46 PM, weshoke notifications@github.com wrote:

If you use vsr::cga2D::circle and similar functions defined in vsr_cga2D_types.h in multiple source files, you'll get a C++ linking error about mulitply defined symbols.

— Reply to this email directly or view it on GitHub https://github.com/wolftype/versor/issues/12.