extern(C++, ns) is wrong

Manu turkeyman at gmail.com
Wed Sep 5 00:31:58 UTC 2018


On Tue, 4 Sep 2018 at 16:35, Walter Bright via Digitalmars-d
<digitalmars-d at puremagic.com> wrote:
>
> On 9/4/2018 3:33 PM, Manu wrote:
> > file1.d
> > ---------
> > module bliz.ecs.component_access;
> > import bliz.ecs.table;
> > import bliz.ecs.types;
> > extern(C++, bliz):
> > // things...
> >
> > Error: project\ecs\include\d2\bliz\ecs\component_access.d(7): Error:
> > namespace `bliz.ecs.component_access.bliz` conflicts with import
> > `bliz.ecs.component_access.bliz` at
> > project\ecs\include\d2\bliz\ecs\component_access.d(3)
> >
> > file2.d
> > ---------
> > module bliz.ecs.table;
> > import bliz.ecs.types;
> > extern(C++, bliz):
> > // things...
> >
> > Error: project\ecs\include\d2\bliz\ecs\table.d(11): Error: namespace
> > `bliz.ecs.table.bliz` conflicts with import `bliz.ecs.table.bliz` at
> > project\ecs\include\d2\bliz\ecs\table.d(5)
>
> I can't help because the examples are incomplete. There is no line 5 in table.d,
> nor a line 7 in component_access.d The error messages are not generated from the
> code posted.

I'm not asking for help. I know painfully well all the workarounds
required to make this stuff work.

I'm just showing one case that you tend to be confronted with
immediately, which is that if you import a module, and then open a
namespace with the same name as the root namespace of a module you
imported, that is an error condition; the namespace conflicts with the
root namespace of the import.


More information about the Digitalmars-d mailing list