Multiple Definitions Error with OFF_reader.h

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Multiple Definitions Error with OFF_reader.h

dlenz
Hi there,

I've run into an issue when including <CGAL/IO/OFF_reader.h> multiple times
into my project - the linker complains of multiple definitions of
read_OFF_internal::fill_point.

The issue is similar to this one:
http://cgal-discuss.949826.n4.nabble.com/multiple-definitions-problem-td2528193.html

Looking into the source, it seems read_OFF_internal::fill_point and
read_OFF_internal::resize are not templated or otherwise dodging the
multiple definition problem, so this makes sense.  There may be other
functions in this file with the same issue, I'm not sure.

I can work around this by being careful with my #includes, but wanted to
bring it to your attention, since as mentioned earlier there's no existing
way to catch this automatically.

If I encounter this problem with other files, should I also submit to this
email list? Is there a preferred way to address this issue?

Thanks for all of your great work on this project,
David



--
Sent from: http://cgal-discuss.949826.n4.nabble.com/

--
You are currently subscribed to cgal-discuss.
To unsubscribe or access the archives, go to
https://sympa.inria.fr/sympa/info/cgal-discuss


Reply | Threaded
Open this post in threaded view
|

Re: Multiple Definitions Error with OFF_reader.h

Sebastien Loriot (GeometryFactory)
I don't remember anybody answering you but it has been fixed
in the 4.12 branch by
https://github.com/CGAL/cgal/pull/3372

Thanks for the report,

Sebastien.

On 10/4/18 7:04 PM, dlenz wrote:

> Hi there,
>
> I've run into an issue when including <CGAL/IO/OFF_reader.h> multiple times
> into my project - the linker complains of multiple definitions of
> read_OFF_internal::fill_point.
>
> The issue is similar to this one:
> http://cgal-discuss.949826.n4.nabble.com/multiple-definitions-problem-td2528193.html
>
> Looking into the source, it seems read_OFF_internal::fill_point and
> read_OFF_internal::resize are not templated or otherwise dodging the
> multiple definition problem, so this makes sense.  There may be other
> functions in this file with the same issue, I'm not sure.
>
> I can work around this by being careful with my #includes, but wanted to
> bring it to your attention, since as mentioned earlier there's no existing
> way to catch this automatically.
>
> If I encounter this problem with other files, should I also submit to this
> email list? Is there a preferred way to address this issue?
>
> Thanks for all of your great work on this project,
> David
>
>
>
> --
> Sent from: http://cgal-discuss.949826.n4.nabble.com/
>

--
You are currently subscribed to cgal-discuss.
To unsubscribe or access the archives, go to
https://sympa.inria.fr/sympa/info/cgal-discuss