On Wednesday, 14 October 2020 at 00:25:56 UTC, Jamie wrote:
Happy to file a bug, but if it was a bug in the mangler
wouldn't both C++ and D get the same result? Assuming D uses
the same mangler for the extern(C++) stuff.
Bug in the D frontend implementation of Itanium C++ mangling.
https://gi
On Wednesday, 14 October 2020 at 01:46:11 UTC, Jack wrote:
extern(C):
int mul(int a, int b) { return a * b;}
mark it `export` as well
and then be sure you are compiling in this module as well, it
must be included on the ldc command line along with wasm.d
I'm compiling with
ldc2 -mtriple=wasm32-unknow-unknow-wasm -betterC wasm.d
I'm playing with wasm, I wrote a small module where I'd like to
make the function available but wasm can't find this function.
math.d
module math;
extern(C):
int mul(int a, int b) { return a * b;}
wasm.d
public import math;
extern(C): // disable D mangling
void doSomething() { ... } // s
On 10/13/20 8:40 PM, Bruno Rodrigues wrote:
So, I tried building a simple hello world with Vibe-d and got this error
/usr/bin/ld: cannot find -lssl
/usr/bin/ld: cannot find -lcrypto
collect2: error: ld returned 1 exit status
Error: linker exited with status 1
/usr/bin/dmd failed with exit code
So, I tried building a simple hello world with Vibe-d and got
this error
/usr/bin/ld: cannot find -lssl
/usr/bin/ld: cannot find -lcrypto
collect2: error: ld returned 1 exit status
Error: linker exited with status 1
/usr/bin/dmd failed with exit code 1.
I have absolutely no ideia what these l
On Tuesday, 13 October 2020 at 23:39:38 UTC, Ali Çehreli wrote:
On 10/13/20 4:11 PM, James Blachly wrote:
On 10/13/20 5:23 AM, Jamie wrote:
I think the issue is with D's "turtles all the way down" style
const. My workaround would be to define wrapper functions that
may need to do casting on
On Tuesday, 13 October 2020 at 23:47:24 UTC, kinke wrote:
On Tuesday, 13 October 2020 at 09:23:48 UTC, Jamie wrote:
It appears that func3 and func4 take on different types
depending on other variables being present? Is this expected?
Nope, it's a bug in the Itanium C++ mangler, please file a b
On Wednesday, 14 October 2020 at 00:07:10 UTC, Marcone wrote:
Solved:
Teste * params = cast(Teste*) lParam;
writeln(params.nome);
writeln(params.idade);
But here, how can send struct?
DialogBoxParam(null, MAKEINTRESOURCE(IDD_DIALOG1), null,
&DlgMain, cast(int) &test); // Error, need "int" b
Solved:
Teste * params = cast(Teste*) lParam;
writeln(params.nome);
writeln(params.idade);
But here, how can send struct?
DialogBoxParam(null, MAKEINTRESOURCE(IDD_DIALOG1), null,
&DlgMain, cast(int) &test); // Error, need "int" but I am sending
Test*
DialogBoxParam receive need "int". How convert struct object
reference to int and cast to struct type after?
I will cast using:
Teste * params = cast(Teste*) LOWORD(lParam);
writeln(params.nome);
writeln(params.idade);
But here, how can send struct?
DialogBoxParam(null, MAKEINTRESOURCE(IDD_
On Tuesday, 13 October 2020 at 09:23:48 UTC, Jamie wrote:
It appears that func3 and func4 take on different types
depending on other variables being present? Is this expected?
Nope, it's a bug in the Itanium C++ mangler, please file a bug.
MSVC++ mangling seems fine, after fixing the D declara
On 10/13/20 4:11 PM, James Blachly wrote:
On 10/13/20 5:23 AM, Jamie wrote:
Building with:
g++ -c a.cpp
dmd main.d a.o
Throws the error:
/usr/bin/ld: main.o: in function `_Dmain':
main.d:(.text._Dmain[_Dmain]+0x31): undefined reference to `void
func3(int*, int*)'
/usr/bin/ld: main.d:(.text._Dm
On 10/13/20 5:23 AM, Jamie wrote:
Building with:
g++ -c a.cpp
dmd main.d a.o
Throws the error:
/usr/bin/ld: main.o: in function `_Dmain':
main.d:(.text._Dmain[_Dmain]+0x31): undefined reference to `void
func3(int*, int*)'
/usr/bin/ld: main.d:(.text._Dmain[_Dmain]+0x3e): undefined reference to
On Tuesday, 13 October 2020 at 22:46:36 UTC, starcanopy wrote:
On Tuesday, 13 October 2020 at 22:26:35 UTC, Marcone wrote:
[...]
Instead of calling DialogBox, you might try DialogBoxParam[A|W].
[...]
-
https://docs.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-dialogboxparamw
On Tuesday, 13 October 2020 at 22:26:35 UTC, Marcone wrote:
struct Teste {
string nome = "Paul";
int idade = 33;
}
extern(Windows):
BOOL DlgMain(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM
lParam) nothrow
{
// I want to be able to use the struct object here.
// writeln(test.
struct Teste {
string nome = "Paul";
int idade = 33;
}
extern(Windows):
BOOL DlgMain(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM
lParam) nothrow
{
// I want to be able to use the struct object here.
// writeln(test.nome);
return false;
}
void chamaJanela(){
Test test
On Tuesday, 13 October 2020 at 17:08:04 UTC, Robert M. Münch
wrote:
On 13 Oct 2020 at 09:57:14 CEST, "aberba"
wrote:
D is a great language that is capable of solving any problem
easier than what it'll take to do in equivalent languages.
Don't get me wrong, D is great, it has a lot of techni
On 13 Oct 2020 at 09:57:14 CEST, "aberba" wrote:
> D is a great language that is capable of solving any problem
> easier than what it'll take to do in equivalent languages.
Don't get me wrong, D is great, it has a lot of technically cool things on
board.
As said, those technical things won't b
On Tuesday, 13 October 2020 at 08:08:54 UTC, aberba wrote:
On Friday, 9 October 2020 at 21:07:28 UTC, jack wrote:
Documentation[1] tells to use
@translationModule!TranslationContext on class, like this:
@translationModule!TranslationContext
class WebInterface {
...
but it return the error:
On Tuesday, 13 October 2020 at 08:07:17 UTC, aberba wrote:
On Friday, 9 October 2020 at 21:07:28 UTC, jack wrote:
Documentation[1] tells to use
@translationModule!TranslationContext on class, like this:
@translationModule!TranslationContext
class WebInterface {
...
but it return the error:
On Tuesday, 13 October 2020 at 08:03:26 UTC, aberba wrote:
On Friday, 9 October 2020 at 21:07:28 UTC, jack wrote:
[...]
Did you do this?
[...]
Yes, I did exacly that.
I find the code with @ ugly. But i know this is not a good
argument. Maybe the glue could have been done better. I think
there is a lot of functionality but I don't understand it by
looking at the code which you easily can with flask or rails.
On 12 Oct 2020 at 21:58:12 CEST, "Ola Fosheim Grøstad"
wrote:
> On Monday, 12 October 2020 at 11:06:55 UTC, Robert M. Münch wrote:
>> Go seems to be kept as simple as possible, even if you have to
>> write more code. Which is, in the long run, the cheaper and
>> smaller burden. No tricks, no
On Tuesday, 13 October 2020 at 15:02:08 UTC, Alaindevos wrote:
What is weird is that rails is THE ruby application , that
flask is the python application, and that dlang can't have
something like that in their standard library.
An opportunity missed.
On the other hand I don't understand the int
What is weird is that rails is THE ruby application , that flask
is the python application, and that dlang can't have something
like that in their standard library.
An opportunity missed.
On the other hand I don't understand the interest in Java/swing
when there is a good working gtkd which is
On Tuesday, 13 October 2020 at 09:02:04 UTC, Marcone wrote:
How to specify which parameters a function that is received as
an argument should receive?
Example:
import std;
void myfun(int n){
writeln(n);
}
void test(lazy void delegate() fun) // how specify that "fun"
may receive int ?
I'm having difficulties linking templated functions with multiple
pointer arguments with extern(C++).
a.cpp
-
template void func1(T *b){}
template void func1(int *b);
template void func2(const T *a){}
template void func2(const int *a);
template void func3(T *b, const T *a){}
template void
How to specify which parameters a function that is received as an
argument should receive?
Example:
import std;
void myfun(int n){
writeln(n);
}
void test(lazy void delegate() fun) // how specify that "fun" may
receive int ?
{
fun(int);
}
test({myfun;});
On Tuesday, 13 October 2020 at 05:13:18 UTC, Mike Parker wrote:
On Monday, 12 October 2020 at 22:31:53 UTC, tastyminerals wrote:
[...]
This:
readText("conf.toml");
[...]
Thanks. I remembered that I read about them in Ali's book but
never actually used them.
On Friday, 9 October 2020 at 21:07:28 UTC, jack wrote:
Documentation[1] tells to use
@translationModule!TranslationContext on class, like this:
@translationModule!TranslationContext
class WebInterface {
...
but it return the error:
Error: template instance
translationModule!(TranslationCon
On Friday, 9 October 2020 at 21:07:28 UTC, jack wrote:
Documentation[1] tells to use
@translationModule!TranslationContext on class, like this:
@translationModule!TranslationContext
class WebInterface {
...
but it return the error:
Error: template instance
translationModule!(TranslationCon
On Friday, 9 October 2020 at 21:07:28 UTC, jack wrote:
Documentation[1] tells to use
@translationModule!TranslationContext on class, like this:
[...]
but it return the error:
[...]
it seems that construtor was removed[2] but I can't find the
replacement anywhere. Could someone help wit
On Saturday, 3 October 2020 at 11:31:27 UTC, Robert M. Münch
wrote:
On 3 Oct 2020 at 13:14:57 CEST, "0xEAB"
wrote:
On Saturday, 3 October 2020 at 07:54:58 UTC, Martin wrote:
On Friday, 2 October 2020 at 09:46:09 UTC, Denis Feklushkin
wrote:
Because standard implementation worse?
What
On Monday, 12 October 2020 at 11:06:55 UTC, Robert M. Münch wrote:
On 11 Oct 2020 at 16:46:13 CEST, "Ola Fosheim Grøstad"
wrote:
Ada, Java, Eiffel are supposed to.
Yes... beside Java, the other two are already in the exotic
department...
I'm not sure if Go is a success in that department
35 matches
Mail list logo