On Wednesday, 16 June 2021 at 16:27:13 UTC, Dennis wrote:
On Wednesday, 16 June 2021 at 14:38:10 UTC, jfondren wrote:
What do I change to
1. a script like this that uses hostname
2. the hostname module
so that both can be built with -betterC when and only when
the script is using -betterC?
On Wednesday, 16 June 2021 at 16:27:13 UTC, Dennis wrote:
It has to be a linker error, dmd cannot know at the time of
compiling project A how project B is going to be compiled and
vice versa.
Well I suppose you could use a specific dub configuration, maybe
giving 'hostname' a targetType
On Wednesday, 16 June 2021 at 14:38:10 UTC, jfondren wrote:
What do I change to
1. a script like this that uses hostname
2. the hostname module
so that both can be built with -betterC when and only when
the script is using -betterC?
That's currently the situation: you can only build when both
On Wednesday, 16 June 2021 at 14:21:40 UTC, jfondren wrote:
Why isn't this linking?
OK, with verbose commands I see that libhostname.a is built
without -betterC
So that's why this fails to link.
What do I change to
1. a script like this that uses hostname
2. the hostname module
so that
Here's a complete script that you can run right now, using
a dub module that I just updated:
```d
#!/usr/bin/env dub
/+ dub.sdl:
dependency "hostname" version="~>0.1.1"
buildOptions "betterC"
+/
extern(C) void main() {
import hostname : hostnamez;
import core.stdc.stdio :