PS: Here are the actual linker errors:
1>phobos64.lib(gc_23c0_122.obj) : error LNK2001: unresolved
external symbol _fltused
1>phobos64.lib(ti_float_2680_3f3.obj) : error LNK2001: unresolved
external symbol _fltused
1>phobos64.lib(hash_d99_76c.obj) : error LNK2001: unresolved
external symbol _
On Saturday, September 7, 2019 2:18:40 PM MDT Jonathan M Davis via
Digitalmars-d-learn wrote:
> On Saturday, September 7, 2019 8:53:54 AM MDT Max Samukha via
> Digitalmars-d-
> learn wrote:
> > extern(C++, "ns1") {
> >
> > extern(C++, ns2) {
> >
> > extern(C++, "ns3") {
> >
> > e
I just ported my Java application to D, got it to compile, but
not to link.
I'm using Windows 10 64 bit, DMD 2.088.0 , Visual D 0.50.1. This
would be a C/C++ project in Visual Studio with only D code.
With my first attempt, I'm missing 65 externals, 328 errors.
I added these two files
ucrt
On Saturday, September 7, 2019 3:40:58 PM MDT Exil via Digitalmars-d-learn
wrote:
> On Saturday, 7 September 2019 at 17:22:07 UTC, Jonathan M Davis
>
> wrote:
> > @safe:
> > @system:
> >
> > then @system overrides @safe.
>
> Just to add onto this, you can't do:
>
> @safe @system void foo(); /
On Saturday, 7 September 2019 at 17:22:07 UTC, Jonathan M Davis
wrote:
@safe:
@system:
then @system overrides @safe.
Just to add onto this, you can't do:
@safe @system void foo(); // error
but you can do:
extern(C++, ns1) extern(C++, ns2) void foo(); // ok
On Saturday, 7 September 2019 at 17:22:07 UTC, Jonathan M Davis
wrote:
makes no sense whatsoever IMHO. IIRC, this version of
extern(C++) didn't go through the DIP process and was simply
added via a PR.
The original extern(C++) worked the same way. Since it was
implemented in v2.066.0 by the
On Saturday, September 7, 2019 8:53:54 AM MDT Max Samukha via Digitalmars-d-
learn wrote:
> extern(C++, "ns1") {
> extern(C++, ns2) {
> extern(C++, "ns3") {
> extern(C++, ns4) {
> void foo();
> }
> }
> }
> }
>
> pragma(msg, foo.mangleof); // _ZN3ns2
On Saturday, September 7, 2019 9:15:44 AM MDT Max Samukha via Digitalmars-d-
learn wrote:
> extern(C++, "ns1"):
> extern(C++, "ns2"): // Not in nested scope. Should it supersede?
> void foo();
>
> pragma(msg, foo.mangleof); // _ZN3ns13ns23fooEv instead of
> expected _ZN3ns23fooEv
>
> Is that by des
extern(C++, "ns1"):
extern(C++, "ns2"): // Not in nested scope. Should it supersede?
void foo();
pragma(msg, foo.mangleof); // _ZN3ns13ns23fooEv instead of
expected _ZN3ns23fooEv
Is that by design?
extern(C++, "ns1") {
extern(C++, ns2) {
extern(C++, "ns3") {
extern(C++, ns4) {
void foo();
}
}
}
}
pragma(msg, foo.mangleof); // _ZN3ns23ns43ns13ns33fooEv
That produce
On Saturday, 7 September 2019 at 13:01:38 UTC, Jacob Carlborg
wrote:
On 2019-09-06 21:03, Max Samukha wrote:
Is there any practical use of having identically named .d and
.di alongside?
Same as in C/C++. This allows you to have a header file if you
want to distribute a closed source library.
On 2019-09-06 11:14, Andrew Edwards wrote:
C++ allows the for following:
struct Demo
{
float a, b, c, d;
Demo() { a = b = c = d = 0.0f; }
Demo(float _a, float _b, float _c, float _d) {
a = _a;
b = _b;
c = _c;
d = _d;
}
float operator[
On 2019-09-06 21:03, Max Samukha wrote:
Is there any practical use of having identically named .d and .di
alongside?
Same as in C/C++. This allows you to have a header file if you want to
distribute a closed source library.
--
/Jacob Carlborg
On Saturday, 7 September 2019 at 12:39:25 UTC, Ali Çehreli wrote:
On 09/07/2019 03:26 AM, Andrew Edwards wrote:
> [1] I did not declare any of the other member variables from
the struct,
> don't know if this is a source of the problem.
Yes, it definitely is a problem. The members are accessed a
On 09/07/2019 03:26 AM, Andrew Edwards wrote:
> [1] I did not declare any of the other member variables from the struct,
> don't know if this is a source of the problem.
Yes, it definitely is a problem. The members are accessed as byte
offsets into their objects. Without defining the other memb
On Saturday, 7 September 2019 at 12:30:53 UTC, Andrew Edwards
wrote:
On Saturday, 7 September 2019 at 12:24:49 UTC, Ali Çehreli
wrote:
On 09/07/2019 03:26 AM, Andrew Edwards wrote:
> float continuallyUpdatedValue;
> float continuallyChangingValue; // [1]
They mean the same thing for
On Saturday, 7 September 2019 at 12:24:49 UTC, Ali Çehreli wrote:
On 09/07/2019 03:26 AM, Andrew Edwards wrote:
> float continuallyUpdatedValue;
> float continuallyChangingValue; // [1]
They mean the same thing for an English speaker but compilers
don't know that (yet?). :)
Ali
L
On 09/07/2019 03:26 AM, Andrew Edwards wrote:
> float continuallyUpdatedValue;
> float continuallyChangingValue; // [1]
They mean the same thing for an English speaker but compilers don't know
that (yet?). :)
Ali
On Saturday, 7 September 2019 at 11:22:09 UTC, Maximillian wrote:
Please could you tell what "goto case;" do here?
I see now "fall-through" [1].
To be honest I like this feature in C and I was sad it didn't
work in D, at least now I know how to solve it. :)
Max.
[1] https://dlang.org/spec/
On Friday, 6 September 2019 at 18:31:29 UTC, Ali Çehreli wrote:
...
void enforceMemberWiseEquality(Demo d, const(float)[] values)
{
switch (values.length) {
case 4:
assert(d.d == values[3]);
goto case;
case 3:
assert(d.c == values[2]);
goto case;
case
I'm running into the following issue when attempting to interface
with C++:
// C++
namespace MySpace
{
MyType& GetData();
}
struct MyType
{
// ...
float continuallyUpdatedValue;
// ...
};
// call site
MySpace::GetData().continuallyUpdatedValue;
// D
extern (C
On Friday, 6 September 2019 at 18:31:29 UTC, Ali Çehreli wrote:
On 09/06/2019 02:14 AM, Andrew Edwards wrote:
> I'm seeking some pointers on how to define these in D
Here is my attempt:
Ali, this is awesome. It solves all 4 problems in on shot. I
definitely don't intend on using the undefin
On Friday, 6 September 2019 at 20:02:35 UTC, Bob4 wrote:
Hi,
I'm coming from a background in Python, without a lot of
experience in statically typed languages, and I'm struggling to
see how to make a certain function in D.
This is what I have in Python:
```
from typing import Union
Number
23 matches
Mail list logo