Re: How to create meson.build with external libs?

2020-01-12 Thread Rasmus Thomsen via Digitalmars-d-learn
On Sunday, 12 January 2020 at 22:20:16 UTC, p.shkadzko wrote: Why do you think 1 is the better way? Well, I suppose I might be a bit biased being a distro packager, but not using dub ensures your package builds properly with what your distro uses (e.g. pkg-config). It _is_ more effort up fron

Re: How to create meson.build with external libs?

2020-01-12 Thread p.shkadzko via Digitalmars-d-learn
On Sunday, 12 January 2020 at 22:12:14 UTC, Rasmus Thomsen wrote: On Sunday, 12 January 2020 at 22:00:33 UTC, p.shkadzko wrote: [...] In difference to dub, meson will _not_ auto-download required software for you. You have to ways to go forward with this: [...] Thanks! I shall try it out.

Re: How to create meson.build with external libs?

2020-01-12 Thread p.shkadzko via Digitalmars-d-learn
On Sunday, 12 January 2020 at 22:12:14 UTC, Rasmus Thomsen wrote: On Sunday, 12 January 2020 at 22:00:33 UTC, p.shkadzko wrote: What do I need to do in order to build the project with "lubeck" dependency in meson? In difference to dub, meson will _not_ auto-download required software for you.

Re: How to create meson.build with external libs?

2020-01-12 Thread Rasmus Thomsen via Digitalmars-d-learn
On Sunday, 12 January 2020 at 22:00:33 UTC, p.shkadzko wrote: What do I need to do in order to build the project with "lubeck" dependency in meson? In difference to dub, meson will _not_ auto-download required software for you. You have to ways to go forward with this: 1 (IMHO the better way

How to create meson.build with external libs?

2020-01-12 Thread p.shkadzko via Digitalmars-d-learn
Ok, I am trying to meson and is struggling with meson.build file. I looked up the examples page: https://github.com/mesonbuild/meson/tree/master/test%20cases/d which has a lot of examples but not the one that shows you how to build your project with some external dependency :) Let's say we ha

Re: Invalid memory operation during allocation with `new`

2020-01-12 Thread Adam D. Ruppe via Digitalmars-d-learn
On Sunday, 12 January 2020 at 15:21:05 UTC, Per Nordlöw wrote: - in the short run, Qualifying all user-defined class destructors with `@nogc`? - in the long run, Making DMD forbid GC-allocations transitively inside class destructors? The class doesn't necessarily know what its destructor

Re: Invalid memory operation during allocation with `new`

2020-01-12 Thread Per Nordlöw via Digitalmars-d-learn
On Sunday, 12 January 2020 at 15:21:05 UTC, Per Nordlöw wrote: Thanks. So what about, - in the short run, Qualifying all user-defined class destructors with `@nogc`? - in the long run, Making DMD forbid GC-allocations transitively inside class destructors? AFAICT, these rules should in m

Re: Invalid memory operation during allocation with `new`

2020-01-12 Thread Per Nordlöw via Digitalmars-d-learn
On Sunday, 12 January 2020 at 13:58:25 UTC, Adam D. Ruppe wrote: Check all the classes created by those unittests. If any of them have destructors that allocate memory in any way - including calling like `writeln(this)` cuz that can call toString, change that. Thanks. So what about, - in the

Re: Invalid memory operation during allocation with `new`

2020-01-12 Thread Adam D. Ruppe via Digitalmars-d-learn
On Sunday, 12 January 2020 at 13:39:42 UTC, Per Nordlöw wrote: core.exception.InvalidMemoryOperationError@src/core/exception.d(647): Invalid memory operation That means a destructor tried to perform a GC operation while the GC was running. The crash happens only if the `unittests` are run p

Get memory used by current process at specific point in time

2020-01-12 Thread Per Nordlöw via Digitalmars-d-learn
Is there a druntime/phobos function for getting the amount of memory (both, stack, malloc, and GC) being used by the current process?

Invalid memory operation during allocation with `new`

2020-01-12 Thread Per Nordlöw via Digitalmars-d-learn
My application has suddendly started crashing as core.exception.InvalidMemoryOperationError@src/core/exception.d(647): Invalid memory operation during a plain allocation with `new` during execution of `main`. The crash happens only if the `unittests` are run prior to `main`. The crash goes aw

Re: Compilation error: undefined reference to 'cblas_dgemv' / 'cblas_dger' / 'cblas_dgemm'

2020-01-12 Thread dnsmt via Digitalmars-d-learn
On Saturday, 11 January 2020 at 16:45:22 UTC, p.shkadzko wrote: I am trying to run example code from https://tour.dlang.org/tour/en/dub/lubeck ... This is Linux Manjaro with openblas package installed. The Lubeck library depends on CBLAS, but the openblas package in the Arch repository is c

Re: Win32 Api: How create Open/"Save as" Dialog?

2020-01-12 Thread Marcone via Digitalmars-d-learn
On Saturday, 11 January 2020 at 14:21:25 UTC, Adam D. Ruppe wrote: On Saturday, 11 January 2020 at 12:22:25 UTC, Marcone wrote: wchar[1024] szFileName = 0; ofn.lpstrFile = cast(LPWSTR) szFileName; You shouldn't cast there, just use `szFileName.ptr` instead. ofn.nMaxFile = MAX_PAT