"error: allocating an object of abstract class type 'Go::IntersectionCurve' ", OS X 10.9 (clang) #7

Closed
yconst opened this Issue Jul 18, 2014 · 4 comments

4 participants

@yconst

I get the following error in compilation of the intersections module, when compiling using clang in OS X 10.9:

In file included from [...]/GoTools-master/intersections/src/CvCvIntersector.C:43:
[...]/GoTools-master/intersections/include/GoTools/intersections/IntersectionPool.h:944:11: error: allocating an object of
      abstract class type 'Go::IntersectionCurve'
        temp(new IntersectionCurve(start, end));
                 ^

Immediately after, the following related notes appear:

[...]/GoTools-master/intersections/include/GoTools/intersections/IntersectionCurve.h:105:5: note: unimplemented pure virtual
      method 'getCurve' in 'IntersectionCurve'
    getCurve() const = 0;
    ^
[...]/GoTools-master/intersections/include/GoTools/intersections/IntersectionCurve.h:116:5: note: unimplemented pure virtual
      method 'getParamCurve' in 'IntersectionCurve'
    getParamCurve(int obj_nmb) const = 0;
    ^
[...]/GoTools-master/intersections/include/GoTools/intersections/IntersectionCurve.h:124:18: note: unimplemented pure virtual
      method 'getParamSpan' in 'IntersectionCurve'
    virtual void getParamSpan(double& start, double& end) const = 0;
                 ^
[...]/GoTools-master/intersections/include/GoTools/intersections/IntersectionCurve.h:136:18: note: unimplemented pure virtual
      method 'evaluateAt' in 'IntersectionCurve'
    virtual void evaluateAt(double pval, Point& pos, Point& tan) = 0;
                 ^
[...]/GoTools-master/intersections/include/GoTools/intersections/IntersectionCurve.h:145:18: note: unimplemented pure virtual
      method 'refine' in 'IntersectionCurve'
    virtual void refine(const double& pos_tol, const double& angle_tol) = 0;
                 ^
[...]/GoTools-master/intersections/include/GoTools/intersections/IntersectionCurve.h:151:18: note: unimplemented pure virtual
      method 'isIsocurve' in 'IntersectionCurve'
    virtual bool isIsocurve() const = 0;
                 ^
[...]/GoTools-master/intersections/include/GoTools/intersections/IntersectionCurve.h:157:18: note: unimplemented pure virtual
      method 'isDegenerated' in 'IntersectionCurve'
    virtual bool isDegenerated() const = 0;
                 ^

Any suggestions?

Thanks

@yconst

Any news on this?

@tordokken
@bobbiesimpson

I got the same error. I got past it by replacing the lines within the function addCurve()

shared_ptr<IntersectionCurve>
temp(new IntersectionCurve(start, end));

with

auto temp = std::make_shared<IntersectionCurve>(start, end);

You could even combine it with the next line to make it a one-liner as:

int_curves_.push_back(std::make_shared<IntersectionCurve>(start, end));
@sbriseid

Sorry about not fixing this sooner ... And thanks for the helping hand, Bobbie!

We mostly develop on Linux, also supporting VS. Mac is however not something we support. But nonetheless I have created a pull request which should be approved shortly, making things run smoothly under Mac (at least with Clang 7.0.2).

Please note that this fix relates to our "working" branch (which perhaps should be renamed "develop" ...).

@sbriseid sbriseid closed this Jan 22, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment