|--- |FIXED
--- Comment #3 from Dlang Bot ---
dlang/dmd pull request #14075 "Fix Issue 21416 - betterC mode program with C++
interface fails to link" was merged into master:
- 2e6ffd14eba3352d36642d8ffab012e8f1787673 by RazvanN7:
Fix Issue 21416 - betterC mode program with C++
---
@RazvanN7 created dlang/dmd pull request #14075 "Fix Issue 21416 - betterC mode
program with C++ interface fails to link" fixing this issue:
- Fix Issue 21416 - betterC mode program with C++ interface fails to link
https://github.com/dlang/dmd/pull/14075
--
from Richard Cattermole ---
Minified further:
extern(C) void main() {}
extern(C++) interface IEntry {
}
extern(C++) class MyEntryInfo : IEntry {
}
This is known to work for ldc 1.26.0.
The __ClassZ error was introduced between dmd 2.094.0 and 2.097.2.
--
On Thursday, 10 June 2021 at 15:19:27 UTC, kinke wrote:
Confirmed: https://issues.dlang.org/show_bug.cgi?id=22014
Thank you for the bug report. I'm glad I couldn't handle it
myself.
The only thing that bothers me is that there is no sign of this
problem being fixed.
I fear that this may
On Thursday, 10 June 2021 at 13:19:34 UTC, dokutoku wrote:
The reason seems to be that WCHAR should be mangled with
wcha_t, but it is mangled with chat16_t.
Confirmed: https://issues.dlang.org/show_bug.cgi?id=22014
Wrt. `tagRECT`, this should come in handy (for a druntime fix):
On Thursday, 10 June 2021 at 13:19:34 UTC, dokutoku wrote:
I still haven't solved this problem.
Not sure if this is the issue, but you don't need `extern` on
these. You already have the `extern(C++)` thing at the top of the
file.
```d
extern void str_test(LPCSTR str1);
It's been a while since then, but the problem with the structure
has been solved.
The reason seems to be that the structure name defined in
core.sys.windows.windef was not tagRECT.
I was able to get it to compile by adding a custom definition as
follows
```d
extern (C)
struct tagRECT
{
https://issues.dlang.org/show_bug.cgi?id=21416
Dibyendu Majumdar changed:
What|Removed |Added
Keywords||betterC, C++
--
https://issues.dlang.org/show_bug.cgi?id=21416
Issue ID: 21416
Summary: betterC mode program with C++ interface fails to link
Product: D
Version: D2
Hardware: x86_64
OS: Linux
Status: NEW
Severity: major
https://issues.dlang.org/show_bug.cgi?id=21412
Dibyendu Majumdar changed:
What|Removed |Added
Status|NEW |RESOLVED
Resolution|---
https://issues.dlang.org/show_bug.cgi?id=21412
--- Comment #4 from Dibyendu Majumdar ---
I assume you mean that it needs to be coded like this?
import core.stdc.stdio : printf;
extern (C++) abstract class A {
void sayHello();
}
extern (C++) class B : A {
override void sayHello() {
https://issues.dlang.org/show_bug.cgi?id=21412
Adam D. Ruppe changed:
What|Removed |Added
CC||destructiona...@gmail.com
--- Comment #3
https://issues.dlang.org/show_bug.cgi?id=21412
--- Comment #2 from Dibyendu Majumdar ---
I tried with / without
@disable this();
Same result
--
https://issues.dlang.org/show_bug.cgi?id=21412
Dibyendu Majumdar changed:
What|Removed |Added
Keywords||betterC, C++
--- Comment #1 from
https://issues.dlang.org/show_bug.cgi?id=21412
Issue ID: 21412
Summary: betterC mode program with C++ interface/class crashes
Product: D
Version: D2
Hardware: x86_64
OS: Linux
Status: NEW
Severity: major
|--- |FIXED
--- Comment #5 from Dlang Bot ---
dlang/dmd pull request #11703 "fix Issue 20716 - Wrong code/ABI for extern(C++)
interface method tha…" was merged into master:
- 9ad79f65edba40925c4f4d92c5603fb5711cd85a by Walter Bright:
fix Issue 20716 - Wrong code/ABI fo
e.g.
mydll.d:
import core.sys.windows.windows;
import core.sys.windows.dll;
extern (C) export int foo(ref int a[10],ref int b[10],ref int
c[10])
{
for(int i=0;i<10;i++)
{
c[10]=a[10]-b[10];
}
return 0;
}
mixin SimpleDllMain;
test.c:
How to write
---
@WalterBright created dlang/dmd pull request #11703 "fix Issue 20716 - Wrong
code/ABI for extern(C++) interface method tha…" fixing this issue:
- fix Issue 20716 - Wrong code/ABI for extern(C++) interface method that
returns non-POD
https://github.com/dlang/dmd/pull/11703
--
https://issues.dlang.org/show_bug.cgi?id=20716
--- Comment #3 from Walter Bright ---
The problem here is the "adjustor thunk" generated does not take into account
the size of the hidden pointer parameter, and winds up adjusting the hidden
pointer rather than the `this` pointer.
--
https://issues.dlang.org/show_bug.cgi?id=20716
--- Comment #2 from Walter Bright ---
Curiously, this works on Windows.
--
I tried to use a function from a library written in C++ in D.
I've been trying to use it in D. But I got an error in LNK2019
and the build failed.
So I created a simple static library as follows and built it.
```cpp
#pragma once
#include
namespace static_test {
void str_test(LPCSTR
https://issues.dlang.org/show_bug.cgi?id=20716
Walter Bright changed:
What|Removed |Added
Keywords||backend
CC|
https://issues.dlang.org/show_bug.cgi?id=20716
Илья Ярошенко changed:
What|Removed |Added
Keywords||C++, wrong-code
--- Comment #1 from Илья
https://issues.dlang.org/show_bug.cgi?id=20716
Issue ID: 20716
Summary: Wrong code/ABI for extern(C++) interface method that
returns non-POD
Product: D
Version: D2
Hardware: x86_64
OS: Linux
On Sunday, March 12, 2017 02:47:19 cy via Digitalmars-d-learn wrote:
> On Saturday, 11 March 2017 at 23:43:54 UTC, Nicholas Wilson wrote:
> > A string *is* a pointer length pair, an immutable(char)[].
>
> Yes, but surely there's some silly requirement, like that the
> pointer must only ever point
cy wrote:
On Saturday, 11 March 2017 at 23:43:54 UTC, Nicholas Wilson wrote:
A string *is* a pointer length pair, an immutable(char)[].
Yes, but surely there's some silly requirement, like that the pointer
must only ever point to garbage collected memory, or something?
why should it? a
On Saturday, 11 March 2017 at 23:43:54 UTC, Nicholas Wilson wrote:
A string *is* a pointer length pair, an immutable(char)[].
Yes, but surely there's some silly requirement, like that the
pointer must only ever point to garbage collected memory, or
something?
ubyte[] arr; // or byte/char
On Saturday, 11 March 2017 at 22:39:02 UTC, cy wrote:
So a lovely C library does its own opaque allocation, and
provides access to the malloc'd memory, and that memory's
length. Instead of copying the results into garbage collected
memory (which would probably be smart) I was thinking about
cy wrote:
So a lovely C library does its own opaque allocation, and provides access
to the malloc'd memory, and that memory's length. Instead of copying the
results into garbage collected memory (which would probably be smart) I
was thinking about creating a structure like:
struct
So a lovely C library does its own opaque allocation, and
provides access to the malloc'd memory, and that memory's length.
Instead of copying the results into garbage collected memory
(which would probably be smart) I was thinking about creating a
structure like:
struct WrappedString {
On Sunday, 27 November 2016 at 23:25:57 UTC, Nicholas Wilson
wrote:
`_D10neo4jTypes17neo4j_map_entry_t6__initZ`, or
Unions are supposed to be default initialised with the first
member, a ulong and thus should be zero initialised.
Right, but neo4j_map_entry_t is a struct and that's the one it
On Sunday, 27 November 2016 at 13:54:54 UTC, Adam D. Ruppe wrote:
On Sunday, 27 November 2016 at 12:59:32 UTC, Timoses wrote:
[...]
It is a linker problem because you didn't link to it... D
structs have an initializer, even if they are used for
interfacing with C. This is a small blob of
On Sunday, 27 November 2016 at 15:56:13 UTC, Stefan Koch wrote:
Does your answer also explain why it works when I move the
mytypes.d into the source/ folder?
dub will link it in when it is in the source folder.
exactly.
On Sunday, 27 November 2016 at 15:23:33 UTC, Timoses wrote:
On Sunday, 27 November 2016 at 14:27:54 UTC, Adam D. Ruppe
wrote:
That's because int is zero initialized by default and thus
doesn't need anything more than a call to zero memory
function, and double isn't (it is NaN), so it gets an
On Sunday, 27 November 2016 at 14:27:54 UTC, Adam D. Ruppe wrote:
That's because int is zero initialized by default and thus
doesn't need anything more than a call to zero memory function,
and double isn't (it is NaN), so it gets an initializer data
blob. If you make it = 0 it might work, but
On Sunday, 27 November 2016 at 14:12:31 UTC, Timoses wrote:
If I change the union's variable type to "int" (or any other)
it compiles just fine. So the problem seems to be the "double"
value.
That's because int is zero initialized by default and thus
doesn't need anything more than a call to
On Sunday, 27 November 2016 at 13:22:36 UTC, Nicholas Wilson
wrote:
The missing symbol is the struct initialiser for
neo4j_map_entry_t. Not sure why is not being generated (it
should), possibly because of the union.
That seems like a bug please report it. http://issues.dlang.org/
Thanks
On Sunday, 27 November 2016 at 12:59:32 UTC, Timoses wrote:
Why is it a linker problem? I'm not linking to the c interface
but merely using D structs...
It is a linker problem because you didn't link to it... D structs
have an initializer, even if they are used for interfacing with
C
neo4jTypes17neo4j_map_entry_t6__initZ", referenced from:
_D6myprogram6myprogram5test2MFZv in myprogram.o
ld: symbol(s) not found for architecture x86_64
______
Why is it a linker problem? I'm not linking to the c interface
but merely using D structs...
The missing symbol is the struct i
m6myprogram5test2MFZv in myprogram.o
ld: symbol(s) not found for architecture x86_64
______
Why is it a linker problem? I'm not linking to the c interface
but merely using D structs...
On Wednesday, 13 July 2016 at 21:27:29 UTC, Adam Sansier wrote:
Yes! your right, If you were only around to tell me that in the
first place! ;) Now we know. Again, as I said before, the
problem is informational.
We know it only after you posted links to threads with relevant
info. You knew
On Wednesday, 13 July 2016 at 21:27:29 UTC, Adam Sansier wrote:
Yes! your right, If you were only around to tell me that in the
first place! ;) Now we know. Again, as I said before, the
problem is informational. Maybe because come works 99% of the
time doesn't help us in the 1% if some
On Wednesday, 13 July 2016 at 20:47:21 UTC, John wrote:
On Wednesday, 13 July 2016 at 20:28:40 UTC, Adam Sansier wrote:
On Wednesday, 13 July 2016 at 19:22:44 UTC, Kagamin wrote:
On Wednesday, 13 July 2016 at 16:48:53 UTC, Adam Sansier
wrote:
There's a lot of misinformation on the net.
On Wednesday, 13 July 2016 at 20:28:40 UTC, Adam Sansier wrote:
On Wednesday, 13 July 2016 at 19:22:44 UTC, Kagamin wrote:
On Wednesday, 13 July 2016 at 16:48:53 UTC, Adam Sansier wrote:
There's a lot of misinformation on the net.
Nope, it's just you. COM support in D and in general works
On Wednesday, 13 July 2016 at 20:02:50 UTC, Jesse Phillips wrote:
On Wednesday, 13 July 2016 at 02:41:22 UTC, Adam Sansier wrote:
If you can convince me to try it out, I might... but doing com
isn't my primary goal here and I seem to have finished up what
I was trying to achieve(my use case is
On Wednesday, 13 July 2016 at 19:22:44 UTC, Kagamin wrote:
On Wednesday, 13 July 2016 at 16:48:53 UTC, Adam Sansier wrote:
There's a lot of misinformation on the net.
Nope, it's just you. COM support in D and in general works fine
for everyone else.
For anyone else having similar problems
On Wednesday, 13 July 2016 at 02:41:22 UTC, Adam Sansier wrote:
If you can convince me to try it out, I might... but doing com
isn't my primary goal here and I seem to have finished up what
I was trying to achieve(my use case is probably relatively
simple though). Last thing I want to do is
On Wednesday, 13 July 2016 at 16:48:53 UTC, Adam Sansier wrote:
There's a lot of misinformation on the net.
Nope, it's just you. COM support in D and in general works fine
for everyone else.
On Wednesday, 13 July 2016 at 08:34:55 UTC, John wrote:
On Wednesday, 13 July 2016 at 07:31:57 UTC, Adam Sansier wrote:
void** ptr = null;
auto res = CoCreateInstance(_ID, cast(IUnknown)null,
CLSCTX_INPROC_SERVER, _ID, cast(void**));
How are you casting your "ptr" variable
On Wednesday, 13 July 2016 at 07:31:57 UTC, Adam Sansier wrote:
void** ptr = null;
auto res = CoCreateInstance(_ID, cast(IUnknown)null,
CLSCTX_INPROC_SERVER, _ID, cast(void**));
See the example above.
IUnknown ptr = null;
auto res = CoCreateInstance(, null,
On Wednesday, 13 July 2016 at 07:31:57 UTC, Adam Sansier wrote:
void** ptr = null;
auto res = CoCreateInstance(_ID, cast(IUnknown)null,
CLSCTX_INPROC_SERVER, _ID, cast(void**));
How are you casting your "ptr" variable (which BTW should be just
void* or usually IUnknown) to your
gular interface in that
there is no object.Interface entry in vtbl[0]; the entries
vtbl[0..$] are all the virtual function pointers, in the
order that they were declared. This matches the COM object
layout used by Windows.
A C++ interface differs from a regular interface in that it
matches the l
On Wednesday, 13 July 2016 at 06:44:36 UTC, Adam Sansier wrote:
Regardless of what you think, I can prove that the code won't
work when it is marked extern(Windows) and works when it is
marked extern (C++)... so what you should be asking yourself is
why it is doing that rather than assuming
tbl[0]; the entries
vtbl[0..$] are all the virtual function pointers, in the order
that they were declared. This matches the COM object layout
used by Windows.
A C++ interface differs from a regular interface in that it
matches the layout of a C++ class using single inheritance on
the target ma
order that they
were declared. This matches the COM object layout used by
Windows.
A C++ interface differs from a regular interface in that it
matches the layout of a C++ class using single inheritance on
the target machine. "
You don't need extern(C++) for COM interfaces. There are several
tbl[0]; the entries vtbl[0..$]
are all the virtual function pointers, in the order that they
were declared. This matches the COM object layout used by Windows.
A C++ interface differs from a regular interface in that it
matches the layout of a C++ class using single inheritance on the
target machine. "
On Wednesday, 13 July 2016 at 02:25:35 UTC, Jesse Phillips wrote:
On Tuesday, 12 July 2016 at 15:09:26 UTC, Adam Sansier wrote:
So, com throughs me a interface ptr and I need to map it to an
interface. When I do, I get an access violation.
I have an (com) ptr and an interface. How do I link
On Tuesday, 12 July 2016 at 23:55:55 UTC, Adam Sansier wrote:
Ok, Another hack:
iInterface x;
void** y = cast(void**)
*y = malloc(iInterface.sizeof);
x.__vptr = cast(immutable(void*)*)(*ptr);
On Tuesday, 12 July 2016 at 15:09:26 UTC, Adam Sansier wrote:
So, com throughs me a interface ptr and I need to map it to an
interface. When I do, I get an access violation.
I have an (com) ptr and an interface. How do I link them up so
I can call the functions?
I marked the interface
On Tuesday, 12 July 2016 at 22:55:05 UTC, Adam Sansier wrote:
So, the problem now, is how to take the interface, which is
simple, no implementation, and either create the
implementation or create a sort of simple empty proxy that can
be used to instantiate the interface?
I mean
So, the problem now, is how to take the interface, which is
simple, no implementation, and either create the implementation
or create a sort of simple empty proxy that can be used to
instantiate the interface?
I mean automatically of course. I believe D already has some
library solution
On Tuesday, 12 July 2016 at 21:21:04 UTC, Adam Sansier wrote:
On Tuesday, 12 July 2016 at 15:12:21 UTC, Lodovico Giaretta
wrote:
I'm not an expert in this field, but did you read this[1]?
[1] https://dlang.org/spec/interface.html#com-interfaces
Yes, of course...
Well, I asked because you
On Tuesday, 12 July 2016 at 15:13:02 UTC, Adam D. Ruppe wrote:
On Tuesday, 12 July 2016 at 15:09:26 UTC, Adam Sansier wrote:
I marked the interface extern(C++) so it's a C++ style
interface.
The first field of a COM object is a pointer to its vtable.
If it is a COM interface, you should
On Tuesday, 12 July 2016 at 15:12:21 UTC, Lodovico Giaretta wrote:
On Tuesday, 12 July 2016 at 15:09:26 UTC, Adam Sansier wrote:
So, com throughs me a interface ptr and I need to map it to an
interface. When I do, I get an access violation.
I have an (com) ptr and an interface. How do I link
On Tuesday, 12 July 2016 at 15:09:26 UTC, Adam Sansier wrote:
I marked the interface extern(C++) so it's a C++ style
interface.
The first field of a COM object is a pointer to its vtable.
If it is a COM interface, you should make it a COM interface by
inheriting from IUnknown.
On Tuesday, 12 July 2016 at 15:09:26 UTC, Adam Sansier wrote:
So, com throughs me a interface ptr and I need to map it to an
interface. When I do, I get an access violation.
I have an (com) ptr and an interface. How do I link them up so
I can call the functions?
I marked the interface
So, com throughs me a interface ptr and I need to map it to an
interface. When I do, I get an access violation.
I have an (com) ptr and an interface. How do I link them up so I
can call the functions?
I marked the interface extern(C++) so it's a C++ style interface.
The first field of a
an extern(C++)
interface
https://github.com/dlang/dmd/commit/b862dab3ba938f4302192947de241b2ac024f95e
Merge pull request #5732 from lionello/fix13867
fix Issue 13867 - Improve error message when overriding an extern(C++)
interface
--
https://issues.dlang.org/show_bug.cgi?id=13867
github-bugzi...@puremagic.com changed:
What|Removed |Added
Status|NEW |RESOLVED
https://issues.dlang.org/show_bug.cgi?id=13867
Lionello Lunesu changed:
What|Removed |Added
Keywords||pull
from one C++ interface in a hierarchy to another is a
noop
https://github.com/D-Programming-Language/dmd/commit/3a1a7e2196497d2dbd233a4bb4c2b2c7a7d3ebb2
Merge pull request #5402 from WalterBright/fix15647
fix Issue 15647 - Casting from one C++ interface in a hierarchy to an…
--
https://issues.dlang.org/show_bug.cgi?id=15647
github-bugzi...@puremagic.com changed:
What|Removed |Added
Status|NEW |RESOLVED
https://issues.dlang.org/show_bug.cgi?id=15647
Walter Bright changed:
What|Removed |Added
Keywords||C++
--
https://issues.dlang.org/show_bug.cgi?id=15647
Issue ID: 15647
Summary: Casting from one C++ interface in a hierarchy to
another is a noop
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
On Monday, 20 July 2015 at 16:06:43 UTC, Shriramana Sharma wrote:
Just now saw Walter's tentative roadmap going forward to 2.69
etc...
I don't see anything mentioned about the promised C++
interface. Was I mistaken in thinking that it is part of 2.68?
Please can anyone in the know have mercy
On 2015-07-20 18:06, Shriramana Sharma via Digitalmars-d wrote:
Just now saw Walter's tentative roadmap going forward to 2.69 etc...
I don't see anything mentioned about the promised C++ interface. Was I
mistaken in thinking that it is part of 2.68? Please can anyone in the
know have mercy
Just now saw Walter's tentative roadmap going forward to 2.69 etc...
I don't see anything mentioned about the promised C++ interface. Was I
mistaken in thinking that it is part of 2.68? Please can anyone in the
know have mercy on us lesser souls and update
http://dlang.org/cpp_interface.html
On Monday, 20 July 2015 at 16:06:43 UTC, Shriramana Sharma wrote:
Just now saw Walter's tentative roadmap going forward to 2.69
etc...
I don't see anything mentioned about the promised C++
interface. Was I mistaken in thinking that it is part of 2.68?
Please can anyone in the know have mercy
On Monday, 20 July 2015 at 16:06:43 UTC, Shriramana Sharma wrote:
I really really want to interface to Qt 5 and am groping in the
dark here as to what to do with c'tors, inheritance, c c...
Maybe not the original meaning of the promise but:
On Monday, 20 July 2015 at 23:27:22 UTC, Elie Morisse wrote:
Despite the lack of update it has kept progressing and I'm
within an inch or two of breaking the silence and making a new
announcement. It's pretty close to usability with C++ libraries
of any complexity.
Cool.
https://issues.dlang.org/show_bug.cgi?id=1688
Andrei Alexandrescu and...@erdani.com changed:
What|Removed |Added
Version|unspecified |D2
--
On Wednesday, 29 April 2015 at 19:04:11 UTC, extrawurst wrote:
On Wednesday, 29 April 2015 at 13:55:46 UTC, Benjamin Thaut
wrote:
On Monday, 27 April 2015 at 21:19:02 UTC, extrawurst wrote:
here is the shortened version of the returned class CSteamID:
On Thursday, 30 April 2015 at 08:18:16 UTC, Benjamin Thaut wrote:
On Wednesday, 29 April 2015 at 19:04:11 UTC, extrawurst wrote:
On Wednesday, 29 April 2015 at 13:55:46 UTC, Benjamin Thaut
wrote:
On Monday, 27 April 2015 at 21:19:02 UTC, extrawurst wrote:
here is the shortened version of the
On Wednesday, 29 April 2015 at 13:55:46 UTC, Benjamin Thaut wrote:
On Monday, 27 April 2015 at 21:19:02 UTC, extrawurst wrote:
here is the shortened version of the returned class CSteamID:
https://gist.github.com/Extrawurst/936f56ceaa87cf287257
this is the shortened interface (no destructors
On Monday, 27 April 2015 at 21:19:02 UTC, extrawurst wrote:
here is the shortened version of the returned class CSteamID:
https://gist.github.com/Extrawurst/936f56ceaa87cf287257
this is the shortened interface (no destructors in the rest of
the code either):
https://issues.dlang.org/show_bug.cgi?id=13867
nick nicolas.jincher...@gmail.com changed:
What|Removed |Added
Severity|enhancement |normal
--
();
extern(C++) interface I
{
void foo();
S bar();
}
```
now the question is why does it crash to access bar() in both
cases? (using alias aswell as the struct)
The C++ class S is a POD class (it contains only 64bits of
data and is compiled byte aligned)
The call to bar() from D just crashes
;
unsigned intm_EAccountType : 4;
EUniversem_EUniverse : 8;
} m_comp;
uint64 m_unAll64Bits;
} m_steamid;
}
```
Where is the fuction declaratiosn for bar? If bar is not
virtual you
can not use a extern(C++) Interface. If bar is non-virtual
you
On Sunday, 26 April 2015 at 15:49:46 UTC, extrawurst wrote:
I hope someone can tell me where my bug is.
I am linking to a dynamic library with C++ interfaces:
```
//alias S = ulong;
struct S
{
ulong data;
}
extern(C) I getI();
extern(C++) interface I
{
void foo();
S bar();
}
```
now
m_EUniverse : 8;
} m_comp;
uint64 m_unAll64Bits;
} m_steamid;
}
```
Where is the fuction declaratiosn for bar? If bar is not virtual
you can not use a extern(C++) Interface. If bar is non-virtual
you have to use a extern(C++) class.
On Monday, 27 April 2015 at 11:00:23 UTC, extrawurst wrote:
Thought about that too and tried uint aswell. does not work
either..
Please post the c++ declarations as well. Which c++ compiler do
you use for win32? (dmc or msvc)
Kind Regards
Benjamin
On Monday, 27 April 2015 at 12:56:57 UTC, Benjamin Thaut wrote:
On Monday, 27 April 2015 at 11:00:23 UTC, extrawurst wrote:
Thought about that too and tried uint aswell. does not work
either..
Please post the c++ declarations as well. Which c++ compiler do
you use for win32? (dmc or msvc)
m_EAccountType : 4;
EUniverse m_EUniverse : 8;
} m_comp;
uint64 m_unAll64Bits;
} m_steamid;
}
```
Where is the fuction declaratiosn for bar? If bar is not
virtual you can not use a extern(C++) Interface. If bar
;
EUniversem_EUniverse : 8;
} m_comp;
uint64 m_unAll64Bits;
} m_steamid;
}
```
Where is the fuction declaratiosn for bar? If bar is not virtual you
can not use a extern(C++) Interface. If bar is non-virtual you have to
use a extern(C++) class.
of course it is all
https://issues.dlang.org/show_bug.cgi?id=13867
--- Comment #1 from nick nicolas.jincher...@gmail.com ---
+1 for allowing extern(C++) interface members to be implemented without
specifying the linkage.
In fact, I believe it is a bug for this not to be the case.
Consider this example:
interface
I hope someone can tell me where my bug is.
I am linking to a dynamic library with C++ interfaces:
```
//alias S = ulong;
struct S
{
ulong data;
}
extern(C) I getI();
extern(C++) interface I
{
void foo();
S bar();
}
```
now the question is why does it crash to access bar() in both
https://issues.dlang.org/show_bug.cgi?id=13867
nick nicolas.jincher...@gmail.com changed:
What|Removed |Added
CC|
On 13/03/2015 7:47 p.m., zhmt wrote:
On Friday, 13 March 2015 at 06:39:31 UTC, Rikki Cattermole wrote:
On 13/03/2015 7:35 p.m., zhmt wrote:
ubyte[] arr ;
I pass the arr.ptr to c program, it fails silently.
Is there any way to cast a ubyte[] to a clang pointer?
Theoretically this should
On Friday, 13 March 2015 at 06:39:31 UTC, Rikki Cattermole wrote:
On 13/03/2015 7:35 p.m., zhmt wrote:
ubyte[] arr ;
I pass the arr.ptr to c program, it fails silently.
Is there any way to cast a ubyte[] to a clang pointer?
Theoretically this should work.
D:
void func(ubyte[] value) {
ubyte[] arr ;
I pass the arr.ptr to c program, it fails silently.
Is there any way to cast a ubyte[] to a clang pointer?
1 - 100 of 152 matches
Mail list logo