[Issue 15579] extern(C++) interfaces/multiple-inheritance

2023-01-29 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15579

Iain Buclaw  changed:

   What|Removed |Added

   See Also||https://issues.dlang.org/sh
   ||ow_bug.cgi?id=23660

--


[Issue 15579] extern(C++) interfaces/multiple-inheritance

2017-08-02 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15579

--- Comment #13 from github-bugzi...@puremagic.com ---
Commit pushed to dmd-cxx at https://github.com/dlang/dmd

https://github.com/dlang/dmd/commit/1a34a0f00eaf5fb8adf4e55d599d83a3d2657649
Issue 15579 - extern(C++) interfaces/multiple-inheritance

--


[Issue 15579] extern(C++) interfaces/multiple-inheritance

2016-03-19 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15579

--- Comment #12 from github-bugzi...@puremagic.com ---
Commits pushed to stable at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/316f2e900dc16ce1351a305c58bad287b2855ad5
fix Issue 15579 - extern(C++) interfaces/multiple-inheritance

https://github.com/D-Programming-Language/dmd/commit/c6ac10aed0f7dc76112e576204e3a1e8ea307dbd
Merge pull request #5361 from WalterBright/fix15579

https://github.com/D-Programming-Language/dmd/commit/073ac6b496971015fc8cce08abea394093d75982
2nd try fix Issue 15579 - extern(C++) interfaces/multiple-inheritance

https://github.com/D-Programming-Language/dmd/commit/b4ac93569071d17ea08fdce017f20c02dc6b727c
Merge pull request #5364 from WalterBright/fix15579-2

--


[Issue 15579] extern(C++) interfaces/multiple-inheritance

2016-01-26 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15579

--- Comment #11 from github-bugzi...@puremagic.com ---
Commits pushed to master at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/073ac6b496971015fc8cce08abea394093d75982
2nd try fix Issue 15579 - extern(C++) interfaces/multiple-inheritance

https://github.com/D-Programming-Language/dmd/commit/b4ac93569071d17ea08fdce017f20c02dc6b727c
Merge pull request #5364 from WalterBright/fix15579-2

2nd try fix Issue 15579 - extern(C++) interfaces/multiple-inheritance

--


[Issue 15579] extern(C++) interfaces/multiple-inheritance

2016-01-24 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15579

--- Comment #10 from Walter Bright  ---
(In reply to Manu from comment #7)
> 3>Building bin\Debug_x64\dplug.dll...
> 3>libdep.lib(component_344_d5.obj) : fatal error LNK1179: invalid or corrupt
> file: duplicate COMDAT '??1Component@ep@@QEAA@XZ'
> [...]
> I presume that symbol exists in cpplib, but the error suggests that D is
> also emitting the same symbol somewhere?

Note the filename in the error message:

   libdep.lib(component_344_d5.obj)

You can also use 'grep' to find all instances and references to
'??1Component@ep@@QEAA@XZ'

--


[Issue 15579] extern(C++) interfaces/multiple-inheritance

2016-01-24 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15579

--- Comment #9 from Walter Bright  ---
Trying again:

https://github.com/D-Programming-Language/dmd/pull/5364

--


[Issue 15579] extern(C++) interfaces/multiple-inheritance

2016-01-22 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15579

Walter Bright  changed:

   What|Removed |Added

 Status|RESOLVED|REOPENED
   Hardware|All |x86_64
 Resolution|FIXED   |---
 OS|All |Windows
   Severity|enhancement |normal

--- Comment #6 from Walter Bright  ---
Reopened because the fix for Win64 is incomplete.

--


[Issue 15579] extern(C++) interfaces/multiple-inheritance

2016-01-22 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15579

github-bugzi...@puremagic.com changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |FIXED

--


[Issue 15579] extern(C++) interfaces/multiple-inheritance

2016-01-22 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15579

--- Comment #5 from github-bugzi...@puremagic.com ---
Commits pushed to master at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/316f2e900dc16ce1351a305c58bad287b2855ad5
fix Issue 15579 - extern(C++) interfaces/multiple-inheritance

https://github.com/D-Programming-Language/dmd/commit/c6ac10aed0f7dc76112e576204e3a1e8ea307dbd
Merge pull request #5361 from WalterBright/fix15579

fix Issue 15579 - extern(C++) interfaces/multiple-inheritance

--


[Issue 15579] extern(C++) interfaces/multiple-inheritance

2016-01-22 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15579

--- Comment #7 from Manu  ---
I was just doing some work with the latest nightly (should have this patch in
it).
I got a compile error that's new since the last nightly I was using:

3>Building bin\Debug_x64\dplug.dll...
3>libdep.lib(component_344_d5.obj) : fatal error LNK1179: invalid or corrupt
file: duplicate COMDAT '??1Component@ep@@QEAA@XZ'

The project structure is:
  cpplib.lib --+
  dlib.lib |
   |
   dplug.dll

So, cpplib has the stuff I'm extern-ing to, dlib is a binding to cpplib with
some adaptation support code, and dplug is a dll which links both libs.
dlib is mostly extern(C++)'s, and a bunch of extra (mostly extern(D)) code for
adaptation.
I presume that symbol exists in cpplib, but the error suggests that D is also
emitting the same symbol somewhere?


Possibly uninteresting, but I have a lot of code like this:

extern(C++) class CppClass
{
  void cppMethod(ref const(CustomString) );
  void cppMethod2();

extern(D):
  void dAdapterMethod(const(char)[] s) { auto temp = CustomString(s.ptr,
s.length); cppMethod(temp); }
}

This is a simple example, but there's a lot of this going on... so the
extern(C++) classes are kitted out with a bunch of extra functions on the D
side.
I only say this, because I wonder if the fact that I'm not strictly binding,
but also extending may lead to symbols being emitted...

--


[Issue 15579] extern(C++) interfaces/multiple-inheritance

2016-01-22 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15579

--- Comment #8 from Manu  ---
/s/compile error/link error/

--


[Issue 15579] extern(C++) interfaces/multiple-inheritance

2016-01-21 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15579

--- Comment #4 from Walter Bright  ---
https://issues.dlang.org/show_bug.cgi?id=15589 remains, though.

--


[Issue 15579] extern(C++) interfaces/multiple-inheritance

2016-01-21 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15579

--- Comment #3 from Walter Bright  ---
https://github.com/D-Programming-Language/dmd/pull/5361

--


[Issue 15579] extern(C++) interfaces/multiple-inheritance

2016-01-21 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15579

Walter Bright  changed:

   What|Removed |Added

 CC||bugzi...@digitalmars.com

--- Comment #2 from Walter Bright  ---
Compilable D version of the code:

  extern (C++)
  {
class Base
{
~this() {}
size_t x = 4;
}

interface Interface
{
int Method();
}

class Derived : Base, Interface
{
size_t y = 5;
int Method() { return 3; }
}
  }

The layout for Win64 Base is:

  4Base6__initZ:
void* 
size_t x;


The layout for Win64 Derived is:

  7Derived6__initZ:
void* 
size_t x;
size_t y;
void* 

These can be figured out by running obj2asm on the object file and looking at
it.

--


[Issue 15579] extern(C++) interfaces/multiple-inheritance

2016-01-19 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15579

deadalnix  changed:

   What|Removed |Added

 CC||deadal...@gmail.com

--- Comment #1 from deadalnix  ---
https://mentorembedded.github.io/cxx-abi/abi.html#vtable

--


[Issue 15579] extern(C++) interfaces/multiple-inheritance

2016-01-19 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15579

Andrei Alexandrescu  changed:

   What|Removed |Added

 CC||and...@erdani.com
Summary|extern(C++) |extern(C++)
   |interfaces/multiple-inherit |interfaces/multiple-inherit
   |ence|ance

--