Module import failing after $ dub add mypackage

Mike Parker aldacron at gmail.com
Fri Jul 16 16:42:50 UTC 2021


On Friday, 16 July 2021 at 15:31:49 UTC, Scotpip wrote:


>
> I'm completely stuck till I can get this fixed, so any help 
> would be very much appreciated!

I used the example from the readme at:

https://code.dlang.org/packages/msgpack-d

which I pasted into the generated `app.d`. And all the command 
lines were:

```
dub init myproject
cd myproject
dub add msgpack-d
dub
```

Compiled fine. I did encounter some missing symbols, though 
(`ntohl` and `ntohs`) as msgpack-d isn't linking with Ws2-32.lib. 
I added `pragma(lib, "Ws2_32")` to the top of the file to resolve 
it. (And I filed an issue: 
https://github.com/msgpack/msgpack-d/issues/120).

Once the linker issues were resolved, all was well.



More information about the Digitalmars-d-learn mailing list