Question

I have some header file Coordinate.h, some Coordinate.inl and some build_geometry.cpp using Coordinate type.

Coordinate.h has two versions, older one with ~Coordinate(); defined and the newer one without destructor definition line. Similarly, Coordinate.inl in newer version does not mention any destructor definition and older version contains:

    INLINE
    Coordinate::~Coordinate()
    {
    }

Now I have to compile build_geometry.cpp against Coordinate.h/Coordinate.inl which works fine only with the older version of Coordinate.h/Coordinate.inl. Otherwise it will ends with error:

    build_geometry.o: build_geometry.cpp:203: more undefined references to `geos::geom::Coordinate::~Coordinate()' follow
    collect2: ld returned 1 exit status

It is apparently caused at ends of cycles/methods in which Coordinate type is used.

So the question is how to compile and link without these empty destructors declared somewhere?

Was it helpful?

Solution

Fixed: there has been some outdated stuff in /usr/local/include/... which precedes correct version from /usr/include/.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top