Why the very same code works in main and not in unittest?

2021-08-20 Thread Pablo De Nápoli via Digitalmars-d-learn
Still working on my project of a D wrapped for libmpdec (https://www.bytereef.org/mpdecimal/). Consider the following code: void main() { mpd_context_t ctx; mpd_t* a; mpd_ieee_context(, 128); a= mpd_new(); } It seems to work fine. mpd_new is a C function

Re: "...cannot be interpreted at compile time" I can't find the source of the error!

2021-08-19 Thread Pablo De Nápoli via Digitalmars-d-learn
On Friday, 20 August 2021 at 02:51:16 UTC, jfondren wrote: On Friday, 20 August 2021 at 02:30:53 UTC, Pablo De Nápoli wrote: Any idea of which could be the cause of trouble or on how to get more specific diagnosis? With no extra arguments I get a "compile time context created here"

"...cannot be interpreted at compile time" I can't find the source of the error!

2021-08-19 Thread Pablo De Nápoli via Digitalmars-d-learn
I am trying to write a D wrapper for libmpdec (https://www.bytereef.org/mpdecimal/). I get the following message (compiling with dmd with -v and -verrros=context) semantic2 cuenta mpdec/decimal.d(35,20): Error: `mpd_new` cannot be interpreted at compile time, because it has no

[vibe.d] How to create authentication system via REST interface?

2019-09-17 Thread Pablo De Nápoli via Digitalmars-d-learn
https://forum.dlang.org/post/bctojiyzicxaueqgm...@forum.dlang.org On Wednesday, 15 March 2017 at 13:24:07 UTC, NX wrote: I'm trying to understand how to create some json-rest api that would return data (in json format) related to that specific logged in user. I see the documentation covers

How may I tell dub where to find a C library for linking?

2018-12-09 Thread Pablo De Nápoli via Digitalmars-d-learn
Hi, I was playing with the example in https://github.com/MoritzMaxeiner/llvm-d/tree/master/examples/fibonacci When I try to build it using dub, the linker cannot find the LLVM library $ dub build Performing "debug" build using /usr/bin/dmd for x86_64. llvm-d 2.4.1: target for configuration